lua-cli 3.15.3 → 3.16.2
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 +41667 -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 +2 -2
- package/package.json +38 -21
- package/scripts/build-vendor.mjs +6 -3
- package/scripts/run-api-extractor.mjs +79 -0
- package/template/.gitignore +21 -0
- package/template/package.json +1 -1
- package/dist/api/agent.api.service.d.ts +0 -165
- package/dist/api/agent.api.service.d.ts.map +0 -1
- package/dist/api/agent.api.service.js +0 -207
- package/dist/api/agent.api.service.js.map +0 -1
- package/dist/api/agents.api.service.d.ts +0 -21
- package/dist/api/agents.api.service.d.ts.map +0 -1
- package/dist/api/agents.api.service.js +0 -51
- package/dist/api/agents.api.service.js.map +0 -1
- package/dist/api/ai.api.service.d.ts +0 -20
- package/dist/api/ai.api.service.d.ts.map +0 -1
- package/dist/api/ai.api.service.js +0 -40
- package/dist/api/ai.api.service.js.map +0 -1
- package/dist/api/auth.api.service.d.ts +0 -49
- package/dist/api/auth.api.service.d.ts.map +0 -1
- package/dist/api/auth.api.service.js +0 -55
- package/dist/api/auth.api.service.js.map +0 -1
- package/dist/api/backup.api.service.d.ts +0 -78
- package/dist/api/backup.api.service.d.ts.map +0 -1
- package/dist/api/backup.api.service.js +0 -115
- package/dist/api/backup.api.service.js.map +0 -1
- package/dist/api/basket.api.service.d.ts +0 -85
- package/dist/api/basket.api.service.d.ts.map +0 -1
- package/dist/api/basket.api.service.js +0 -160
- package/dist/api/basket.api.service.js.map +0 -1
- package/dist/api/cdn.api.service.d.ts +0 -21
- package/dist/api/cdn.api.service.d.ts.map +0 -1
- package/dist/api/cdn.api.service.js +0 -46
- package/dist/api/cdn.api.service.js.map +0 -1
- package/dist/api/chat.api.service.d.ts +0 -40
- package/dist/api/chat.api.service.d.ts.map +0 -1
- package/dist/api/chat.api.service.js +0 -121
- package/dist/api/chat.api.service.js.map +0 -1
- package/dist/api/credentials.d.ts +0 -25
- package/dist/api/credentials.d.ts.map +0 -1
- package/dist/api/credentials.js +0 -44
- package/dist/api/credentials.js.map +0 -1
- package/dist/api/custom.data.api.service.d.ts +0 -71
- package/dist/api/custom.data.api.service.d.ts.map +0 -1
- package/dist/api/custom.data.api.service.js +0 -126
- package/dist/api/custom.data.api.service.js.map +0 -1
- package/dist/api/developer.api.service.d.ts +0 -121
- package/dist/api/developer.api.service.d.ts.map +0 -1
- package/dist/api/developer.api.service.js +0 -162
- package/dist/api/developer.api.service.js.map +0 -1
- package/dist/api/device-trigger.api.service.d.ts +0 -136
- package/dist/api/device-trigger.api.service.d.ts.map +0 -1
- package/dist/api/device-trigger.api.service.js +0 -120
- package/dist/api/device-trigger.api.service.js.map +0 -1
- package/dist/api/device.api.service.d.ts +0 -61
- package/dist/api/device.api.service.d.ts.map +0 -1
- package/dist/api/device.api.service.js +0 -72
- package/dist/api/device.api.service.js.map +0 -1
- package/dist/api/http.client.d.ts +0 -90
- package/dist/api/http.client.d.ts.map +0 -1
- package/dist/api/http.client.js +0 -265
- package/dist/api/http.client.js.map +0 -1
- package/dist/api/job.api.service.d.ts +0 -154
- package/dist/api/job.api.service.d.ts.map +0 -1
- package/dist/api/job.api.service.js +0 -230
- package/dist/api/job.api.service.js.map +0 -1
- package/dist/api/lazy-instances.d.ts +0 -107
- package/dist/api/lazy-instances.d.ts.map +0 -1
- package/dist/api/lazy-instances.js +0 -220
- package/dist/api/lazy-instances.js.map +0 -1
- package/dist/api/logs.api.service.d.ts +0 -38
- package/dist/api/logs.api.service.d.ts.map +0 -1
- package/dist/api/logs.api.service.js +0 -50
- package/dist/api/logs.api.service.js.map +0 -1
- package/dist/api/marketplace.api.service.d.ts +0 -28
- package/dist/api/marketplace.api.service.d.ts.map +0 -1
- package/dist/api/marketplace.api.service.js +0 -112
- package/dist/api/marketplace.api.service.js.map +0 -1
- package/dist/api/order.api.service.d.ts +0 -53
- package/dist/api/order.api.service.d.ts.map +0 -1
- package/dist/api/order.api.service.js +0 -94
- package/dist/api/order.api.service.js.map +0 -1
- package/dist/api/persona.api.service.d.ts +0 -56
- package/dist/api/persona.api.service.d.ts.map +0 -1
- package/dist/api/persona.api.service.js +0 -90
- package/dist/api/persona.api.service.js.map +0 -1
- package/dist/api/postprocessor.api.service.d.ts +0 -151
- package/dist/api/postprocessor.api.service.d.ts.map +0 -1
- package/dist/api/postprocessor.api.service.js +0 -109
- package/dist/api/postprocessor.api.service.js.map +0 -1
- package/dist/api/preprocessor.api.service.d.ts +0 -155
- package/dist/api/preprocessor.api.service.d.ts.map +0 -1
- package/dist/api/preprocessor.api.service.js +0 -111
- package/dist/api/preprocessor.api.service.js.map +0 -1
- package/dist/api/products.api.service.d.ts +0 -80
- package/dist/api/products.api.service.d.ts.map +0 -1
- package/dist/api/products.api.service.js +0 -126
- package/dist/api/products.api.service.js.map +0 -1
- package/dist/api/resource.api.service.d.ts +0 -77
- package/dist/api/resource.api.service.d.ts.map +0 -1
- package/dist/api/resource.api.service.js +0 -74
- package/dist/api/resource.api.service.js.map +0 -1
- package/dist/api/skills.api.service.d.ts +0 -94
- package/dist/api/skills.api.service.d.ts.map +0 -1
- package/dist/api/skills.api.service.js +0 -120
- package/dist/api/skills.api.service.js.map +0 -1
- package/dist/api/tool.api.service.d.ts +0 -53
- package/dist/api/tool.api.service.d.ts.map +0 -1
- package/dist/api/tool.api.service.js +0 -74
- package/dist/api/tool.api.service.js.map +0 -1
- package/dist/api/unifiedto.api.service.d.ts +0 -133
- package/dist/api/unifiedto.api.service.d.ts.map +0 -1
- package/dist/api/unifiedto.api.service.js +0 -166
- package/dist/api/unifiedto.api.service.js.map +0 -1
- package/dist/api/user.data.api.service.d.ts +0 -69
- package/dist/api/user.data.api.service.d.ts.map +0 -1
- package/dist/api/user.data.api.service.js +0 -158
- package/dist/api/user.data.api.service.js.map +0 -1
- package/dist/api/webhook.api.service.d.ts +0 -163
- package/dist/api/webhook.api.service.d.ts.map +0 -1
- package/dist/api/webhook.api.service.js +0 -140
- package/dist/api/webhook.api.service.js.map +0 -1
- package/dist/api/whatsapp-templates.api.service.d.ts +0 -41
- package/dist/api/whatsapp-templates.api.service.d.ts.map +0 -1
- package/dist/api/whatsapp-templates.api.service.js +0 -79
- package/dist/api/whatsapp-templates.api.service.js.map +0 -1
- package/dist/api-exports.d.ts.map +0 -1
- package/dist/cli/command-definitions.d.ts +0 -29
- package/dist/cli/command-definitions.d.ts.map +0 -1
- package/dist/cli/command-definitions.js +0 -943
- package/dist/cli/command-definitions.js.map +0 -1
- package/dist/commands/admin.d.ts +0 -24
- package/dist/commands/admin.d.ts.map +0 -1
- package/dist/commands/admin.js +0 -44
- package/dist/commands/admin.js.map +0 -1
- package/dist/commands/agents.d.ts +0 -23
- package/dist/commands/agents.d.ts.map +0 -1
- package/dist/commands/agents.js +0 -83
- package/dist/commands/agents.js.map +0 -1
- package/dist/commands/apiKey.d.ts +0 -8
- package/dist/commands/apiKey.d.ts.map +0 -1
- package/dist/commands/apiKey.js +0 -43
- package/dist/commands/apiKey.js.map +0 -1
- package/dist/commands/channels.d.ts +0 -13
- package/dist/commands/channels.d.ts.map +0 -1
- package/dist/commands/channels.js +0 -747
- package/dist/commands/channels.js.map +0 -1
- package/dist/commands/chat-log-probe.d.ts +0 -59
- package/dist/commands/chat-log-probe.d.ts.map +0 -1
- package/dist/commands/chat-log-probe.js +0 -87
- package/dist/commands/chat-log-probe.js.map +0 -1
- package/dist/commands/chat.d.ts +0 -20
- package/dist/commands/chat.d.ts.map +0 -1
- package/dist/commands/chat.js +0 -618
- package/dist/commands/chat.js.map +0 -1
- package/dist/commands/chatClear.d.ts +0 -25
- package/dist/commands/chatClear.d.ts.map +0 -1
- package/dist/commands/chatClear.js +0 -71
- package/dist/commands/chatClear.js.map +0 -1
- package/dist/commands/compile.d.ts +0 -48
- package/dist/commands/compile.d.ts.map +0 -1
- package/dist/commands/compile.js +0 -216
- package/dist/commands/compile.js.map +0 -1
- package/dist/commands/completion.d.ts +0 -12
- package/dist/commands/completion.d.ts.map +0 -1
- package/dist/commands/completion.js +0 -211
- package/dist/commands/completion.js.map +0 -1
- package/dist/commands/configure.d.ts +0 -42
- package/dist/commands/configure.d.ts.map +0 -1
- package/dist/commands/configure.js +0 -76
- package/dist/commands/configure.js.map +0 -1
- package/dist/commands/deploy.d.ts +0 -14
- package/dist/commands/deploy.d.ts.map +0 -1
- package/dist/commands/deploy.js +0 -517
- package/dist/commands/deploy.js.map +0 -1
- package/dist/commands/destroy.d.ts +0 -8
- package/dist/commands/destroy.d.ts.map +0 -1
- package/dist/commands/destroy.js +0 -66
- package/dist/commands/destroy.js.map +0 -1
- package/dist/commands/devices.d.ts +0 -6
- package/dist/commands/devices.d.ts.map +0 -1
- package/dist/commands/devices.js +0 -265
- package/dist/commands/devices.js.map +0 -1
- package/dist/commands/docs.d.ts +0 -20
- package/dist/commands/docs.d.ts.map +0 -1
- package/dist/commands/docs.js +0 -33
- package/dist/commands/docs.js.map +0 -1
- package/dist/commands/env.d.ts +0 -34
- package/dist/commands/env.d.ts.map +0 -1
- package/dist/commands/env.js +0 -612
- package/dist/commands/env.js.map +0 -1
- package/dist/commands/evals.d.ts +0 -9
- package/dist/commands/evals.d.ts.map +0 -1
- package/dist/commands/evals.js +0 -27
- package/dist/commands/evals.js.map +0 -1
- package/dist/commands/features.d.ts +0 -13
- package/dist/commands/features.d.ts.map +0 -1
- package/dist/commands/features.js +0 -455
- package/dist/commands/features.js.map +0 -1
- package/dist/commands/governance.d.ts +0 -7
- package/dist/commands/governance.d.ts.map +0 -1
- package/dist/commands/governance.js +0 -258
- package/dist/commands/governance.js.map +0 -1
- package/dist/commands/index.d.ts +0 -38
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js +0 -38
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/init.d.ts +0 -53
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -992
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/integrations.d.ts +0 -18
- package/dist/commands/integrations.d.ts.map +0 -1
- package/dist/commands/integrations.js +0 -2666
- package/dist/commands/integrations.js.map +0 -1
- package/dist/commands/jobs.d.ts +0 -13
- package/dist/commands/jobs.d.ts.map +0 -1
- package/dist/commands/jobs.js +0 -736
- package/dist/commands/jobs.js.map +0 -1
- package/dist/commands/log-tip.d.ts +0 -79
- package/dist/commands/log-tip.d.ts.map +0 -1
- package/dist/commands/log-tip.js +0 -83
- package/dist/commands/log-tip.js.map +0 -1
- package/dist/commands/logs.d.ts +0 -13
- package/dist/commands/logs.d.ts.map +0 -1
- package/dist/commands/logs.js +0 -493
- package/dist/commands/logs.js.map +0 -1
- package/dist/commands/marketplace.d.ts +0 -34
- package/dist/commands/marketplace.d.ts.map +0 -1
- package/dist/commands/marketplace.js +0 -2105
- package/dist/commands/marketplace.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -32
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -395
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/models.d.ts +0 -18
- package/dist/commands/models.d.ts.map +0 -1
- package/dist/commands/models.js +0 -207
- package/dist/commands/models.js.map +0 -1
- package/dist/commands/persona.d.ts +0 -13
- package/dist/commands/persona.d.ts.map +0 -1
- package/dist/commands/persona.js +0 -560
- package/dist/commands/persona.js.map +0 -1
- package/dist/commands/postprocessors.d.ts +0 -13
- package/dist/commands/postprocessors.d.ts.map +0 -1
- package/dist/commands/postprocessors.js +0 -558
- package/dist/commands/postprocessors.js.map +0 -1
- package/dist/commands/preprocessors.d.ts +0 -13
- package/dist/commands/preprocessors.d.ts.map +0 -1
- package/dist/commands/preprocessors.js +0 -558
- package/dist/commands/preprocessors.js.map +0 -1
- package/dist/commands/production.d.ts +0 -13
- package/dist/commands/production.d.ts.map +0 -1
- package/dist/commands/production.js +0 -588
- package/dist/commands/production.js.map +0 -1
- package/dist/commands/push-helpers.d.ts +0 -42
- package/dist/commands/push-helpers.d.ts.map +0 -1
- package/dist/commands/push-helpers.js +0 -48
- package/dist/commands/push-helpers.js.map +0 -1
- package/dist/commands/push.d.ts +0 -31
- package/dist/commands/push.d.ts.map +0 -1
- package/dist/commands/push.js +0 -1262
- package/dist/commands/push.js.map +0 -1
- package/dist/commands/pushBackup.d.ts +0 -78
- package/dist/commands/pushBackup.d.ts.map +0 -1
- package/dist/commands/pushBackup.js +0 -274
- package/dist/commands/pushBackup.js.map +0 -1
- package/dist/commands/resources.d.ts +0 -13
- package/dist/commands/resources.d.ts.map +0 -1
- package/dist/commands/resources.js +0 -377
- package/dist/commands/resources.js.map +0 -1
- package/dist/commands/skills.d.ts +0 -13
- package/dist/commands/skills.d.ts.map +0 -1
- package/dist/commands/skills.js +0 -618
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/source.d.ts +0 -72
- package/dist/commands/source.d.ts.map +0 -1
- package/dist/commands/source.js +0 -134
- package/dist/commands/source.js.map +0 -1
- package/dist/commands/status.d.ts +0 -14
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -731
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/sync.d.ts +0 -28
- package/dist/commands/sync.d.ts.map +0 -1
- package/dist/commands/sync.js +0 -802
- package/dist/commands/sync.js.map +0 -1
- package/dist/commands/telemetry.d.ts +0 -6
- package/dist/commands/telemetry.d.ts.map +0 -1
- package/dist/commands/telemetry.js +0 -42
- package/dist/commands/telemetry.js.map +0 -1
- package/dist/commands/test-output.helpers.d.ts +0 -24
- package/dist/commands/test-output.helpers.d.ts.map +0 -1
- package/dist/commands/test-output.helpers.js +0 -62
- package/dist/commands/test-output.helpers.js.map +0 -1
- package/dist/commands/test.d.ts +0 -9
- package/dist/commands/test.d.ts.map +0 -1
- package/dist/commands/test.js +0 -787
- package/dist/commands/test.js.map +0 -1
- package/dist/commands/update.d.ts +0 -14
- package/dist/commands/update.d.ts.map +0 -1
- package/dist/commands/update.js +0 -97
- package/dist/commands/update.js.map +0 -1
- package/dist/commands/webhooks.d.ts +0 -13
- package/dist/commands/webhooks.d.ts.map +0 -1
- package/dist/commands/webhooks.js +0 -691
- package/dist/commands/webhooks.js.map +0 -1
- package/dist/compiler/agent-traverser.d.ts +0 -140
- package/dist/compiler/agent-traverser.d.ts.map +0 -1
- package/dist/compiler/agent-traverser.js +0 -420
- package/dist/compiler/agent-traverser.js.map +0 -1
- package/dist/compiler/bundler.d.ts +0 -43
- package/dist/compiler/bundler.d.ts.map +0 -1
- package/dist/compiler/bundler.js +0 -188
- package/dist/compiler/bundler.js.map +0 -1
- package/dist/compiler/compiler.d.ts +0 -208
- package/dist/compiler/compiler.d.ts.map +0 -1
- package/dist/compiler/compiler.js +0 -706
- package/dist/compiler/compiler.js.map +0 -1
- package/dist/compiler/index.d.ts +0 -38
- package/dist/compiler/index.d.ts.map +0 -1
- package/dist/compiler/index.js +0 -43
- package/dist/compiler/index.js.map +0 -1
- package/dist/compiler/plugins/agent.plugin.d.ts +0 -58
- package/dist/compiler/plugins/agent.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/agent.plugin.js +0 -161
- package/dist/compiler/plugins/agent.plugin.js.map +0 -1
- package/dist/compiler/plugins/base.d.ts +0 -334
- package/dist/compiler/plugins/base.d.ts.map +0 -1
- package/dist/compiler/plugins/base.js +0 -353
- package/dist/compiler/plugins/base.js.map +0 -1
- package/dist/compiler/plugins/device-trigger.plugin.d.ts +0 -38
- package/dist/compiler/plugins/device-trigger.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/device-trigger.plugin.js +0 -107
- package/dist/compiler/plugins/device-trigger.plugin.js.map +0 -1
- package/dist/compiler/plugins/device.plugin.d.ts +0 -39
- package/dist/compiler/plugins/device.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/device.plugin.js +0 -77
- package/dist/compiler/plugins/device.plugin.js.map +0 -1
- package/dist/compiler/plugins/job.plugin.d.ts +0 -34
- package/dist/compiler/plugins/job.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/job.plugin.js +0 -108
- package/dist/compiler/plugins/job.plugin.js.map +0 -1
- package/dist/compiler/plugins/mcp-server.plugin.d.ts +0 -38
- package/dist/compiler/plugins/mcp-server.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/mcp-server.plugin.js +0 -107
- package/dist/compiler/plugins/mcp-server.plugin.js.map +0 -1
- package/dist/compiler/plugins/postprocessor.plugin.d.ts +0 -21
- package/dist/compiler/plugins/postprocessor.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/postprocessor.plugin.js +0 -36
- package/dist/compiler/plugins/postprocessor.plugin.js.map +0 -1
- package/dist/compiler/plugins/preprocessor.plugin.d.ts +0 -21
- package/dist/compiler/plugins/preprocessor.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/preprocessor.plugin.js +0 -38
- package/dist/compiler/plugins/preprocessor.plugin.js.map +0 -1
- package/dist/compiler/plugins/processor-base.d.ts +0 -17
- package/dist/compiler/plugins/processor-base.d.ts.map +0 -1
- package/dist/compiler/plugins/processor-base.js +0 -27
- package/dist/compiler/plugins/processor-base.js.map +0 -1
- package/dist/compiler/plugins/registry.d.ts +0 -62
- package/dist/compiler/plugins/registry.d.ts.map +0 -1
- package/dist/compiler/plugins/registry.js +0 -113
- package/dist/compiler/plugins/registry.js.map +0 -1
- package/dist/compiler/plugins/skill.plugin.d.ts +0 -106
- package/dist/compiler/plugins/skill.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/skill.plugin.js +0 -316
- package/dist/compiler/plugins/skill.plugin.js.map +0 -1
- package/dist/compiler/plugins/tool.plugin.d.ts +0 -69
- package/dist/compiler/plugins/tool.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/tool.plugin.js +0 -262
- package/dist/compiler/plugins/tool.plugin.js.map +0 -1
- package/dist/compiler/plugins/webhook.plugin.d.ts +0 -38
- package/dist/compiler/plugins/webhook.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/webhook.plugin.js +0 -117
- package/dist/compiler/plugins/webhook.plugin.js.map +0 -1
- package/dist/compiler/source-writer.d.ts +0 -129
- package/dist/compiler/source-writer.d.ts.map +0 -1
- package/dist/compiler/source-writer.js +0 -329
- package/dist/compiler/source-writer.js.map +0 -1
- package/dist/compiler/types.d.ts +0 -391
- package/dist/compiler/types.d.ts.map +0 -1
- package/dist/compiler/types.js +0 -30
- package/dist/compiler/types.js.map +0 -1
- package/dist/compiler/utils/ast-helpers.d.ts +0 -106
- package/dist/compiler/utils/ast-helpers.d.ts.map +0 -1
- package/dist/compiler/utils/ast-helpers.js +0 -356
- package/dist/compiler/utils/ast-helpers.js.map +0 -1
- package/dist/compiler/utils/common.d.ts +0 -22
- package/dist/compiler/utils/common.d.ts.map +0 -1
- package/dist/compiler/utils/common.js +0 -55
- package/dist/compiler/utils/common.js.map +0 -1
- package/dist/compiler/utils/file-discovery.d.ts +0 -35
- package/dist/compiler/utils/file-discovery.d.ts.map +0 -1
- package/dist/compiler/utils/file-discovery.js +0 -60
- package/dist/compiler/utils/file-discovery.js.map +0 -1
- package/dist/compiler/utils/path-resolver.d.ts +0 -83
- package/dist/compiler/utils/path-resolver.d.ts.map +0 -1
- package/dist/compiler/utils/path-resolver.js +0 -162
- package/dist/compiler/utils/path-resolver.js.map +0 -1
- package/dist/compiler/utils/reference-resolver.d.ts +0 -196
- package/dist/compiler/utils/reference-resolver.d.ts.map +0 -1
- package/dist/compiler/utils/reference-resolver.js +0 -1026
- package/dist/compiler/utils/reference-resolver.js.map +0 -1
- package/dist/compiler/utils/schema-converter.d.ts +0 -52
- package/dist/compiler/utils/schema-converter.d.ts.map +0 -1
- package/dist/compiler/utils/schema-converter.js +0 -170
- package/dist/compiler/utils/schema-converter.js.map +0 -1
- package/dist/compiler/utils/workspace.d.ts +0 -35
- package/dist/compiler/utils/workspace.d.ts.map +0 -1
- package/dist/compiler/utils/workspace.js +0 -121
- package/dist/compiler/utils/workspace.js.map +0 -1
- package/dist/config/compile.constants.d.ts +0 -75
- package/dist/config/compile.constants.d.ts.map +0 -1
- package/dist/config/compile.constants.js +0 -95
- package/dist/config/compile.constants.js.map +0 -1
- package/dist/config/constants.d.ts +0 -49
- package/dist/config/constants.d.ts.map +0 -1
- package/dist/config/constants.js +0 -69
- package/dist/config/constants.js.map +0 -1
- package/dist/errors/auth.error.d.ts +0 -34
- package/dist/errors/auth.error.d.ts.map +0 -1
- package/dist/errors/auth.error.js +0 -29
- package/dist/errors/auth.error.js.map +0 -1
- package/dist/errors/index.d.ts +0 -5
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/index.js +0 -5
- package/dist/errors/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/instances/basket.instance.d.ts +0 -82
- package/dist/instances/basket.instance.d.ts.map +0 -1
- package/dist/instances/basket.instance.js +0 -245
- package/dist/instances/basket.instance.js.map +0 -1
- package/dist/instances/data.entry.instance.d.ts +0 -50
- package/dist/instances/data.entry.instance.d.ts.map +0 -1
- package/dist/instances/data.entry.instance.js +0 -163
- package/dist/instances/data.entry.instance.js.map +0 -1
- package/dist/instances/job.instance.d.ts +0 -133
- package/dist/instances/job.instance.d.ts.map +0 -1
- package/dist/instances/job.instance.js +0 -180
- package/dist/instances/job.instance.js.map +0 -1
- package/dist/instances/order.instance.d.ts +0 -50
- package/dist/instances/order.instance.d.ts.map +0 -1
- package/dist/instances/order.instance.js +0 -199
- package/dist/instances/order.instance.js.map +0 -1
- package/dist/instances/product.instance.d.ts +0 -43
- package/dist/instances/product.instance.d.ts.map +0 -1
- package/dist/instances/product.instance.js +0 -145
- package/dist/instances/product.instance.js.map +0 -1
- package/dist/instances/product.pagination.instance.d.ts +0 -102
- package/dist/instances/product.pagination.instance.d.ts.map +0 -1
- package/dist/instances/product.pagination.instance.js +0 -156
- package/dist/instances/product.pagination.instance.js.map +0 -1
- package/dist/instances/product.search.instance.d.ts +0 -81
- package/dist/instances/product.search.instance.d.ts.map +0 -1
- package/dist/instances/product.search.instance.js +0 -121
- package/dist/instances/product.search.instance.js.map +0 -1
- package/dist/instances/user.instance.d.ts +0 -56
- package/dist/instances/user.instance.d.ts.map +0 -1
- package/dist/instances/user.instance.js +0 -188
- package/dist/instances/user.instance.js.map +0 -1
- package/dist/interfaces/admin.d.ts +0 -64
- package/dist/interfaces/admin.d.ts.map +0 -1
- package/dist/interfaces/admin.js +0 -6
- package/dist/interfaces/admin.js.map +0 -1
- package/dist/interfaces/agent.d.ts +0 -399
- package/dist/interfaces/agent.d.ts.map +0 -1
- package/dist/interfaces/agent.js +0 -6
- package/dist/interfaces/agent.js.map +0 -1
- package/dist/interfaces/backup.d.ts +0 -17
- package/dist/interfaces/backup.d.ts.map +0 -1
- package/dist/interfaces/backup.js +0 -7
- package/dist/interfaces/backup.js.map +0 -1
- package/dist/interfaces/baskets.d.ts +0 -80
- package/dist/interfaces/baskets.d.ts.map +0 -1
- package/dist/interfaces/baskets.js +0 -20
- package/dist/interfaces/baskets.js.map +0 -1
- package/dist/interfaces/cdn.d.ts +0 -25
- package/dist/interfaces/cdn.d.ts.map +0 -1
- package/dist/interfaces/cdn.js +0 -6
- package/dist/interfaces/cdn.js.map +0 -1
- package/dist/interfaces/chat.d.ts +0 -98
- package/dist/interfaces/chat.d.ts.map +0 -1
- package/dist/interfaces/chat.js +0 -6
- package/dist/interfaces/chat.js.map +0 -1
- package/dist/interfaces/common.d.ts +0 -64
- package/dist/interfaces/common.d.ts.map +0 -1
- package/dist/interfaces/common.js +0 -9
- package/dist/interfaces/common.js.map +0 -1
- package/dist/interfaces/custom.data.d.ts +0 -83
- package/dist/interfaces/custom.data.d.ts.map +0 -1
- package/dist/interfaces/custom.data.js +0 -6
- package/dist/interfaces/custom.data.js.map +0 -1
- package/dist/interfaces/deploy.d.ts +0 -15
- package/dist/interfaces/deploy.d.ts.map +0 -1
- package/dist/interfaces/deploy.js +0 -5
- package/dist/interfaces/deploy.js.map +0 -1
- package/dist/interfaces/dev.d.ts +0 -54
- package/dist/interfaces/dev.d.ts.map +0 -1
- package/dist/interfaces/dev.js +0 -6
- package/dist/interfaces/dev.js.map +0 -1
- package/dist/interfaces/device-triggers.d.ts +0 -80
- package/dist/interfaces/device-triggers.d.ts.map +0 -1
- package/dist/interfaces/device-triggers.js +0 -6
- package/dist/interfaces/device-triggers.js.map +0 -1
- package/dist/interfaces/devices.d.ts +0 -74
- package/dist/interfaces/devices.d.ts.map +0 -1
- package/dist/interfaces/devices.js +0 -5
- package/dist/interfaces/devices.js.map +0 -1
- package/dist/interfaces/index.d.ts +0 -15
- package/dist/interfaces/index.d.ts.map +0 -1
- package/dist/interfaces/index.js +0 -8
- package/dist/interfaces/index.js.map +0 -1
- package/dist/interfaces/init.d.ts +0 -42
- package/dist/interfaces/init.d.ts.map +0 -1
- package/dist/interfaces/init.js +0 -5
- package/dist/interfaces/init.js.map +0 -1
- package/dist/interfaces/jobs.d.ts +0 -149
- package/dist/interfaces/jobs.d.ts.map +0 -1
- package/dist/interfaces/jobs.js +0 -6
- package/dist/interfaces/jobs.js.map +0 -1
- package/dist/interfaces/logs.d.ts +0 -44
- package/dist/interfaces/logs.d.ts.map +0 -1
- package/dist/interfaces/logs.js +0 -6
- package/dist/interfaces/logs.js.map +0 -1
- package/dist/interfaces/lua.d.ts +0 -37
- package/dist/interfaces/lua.d.ts.map +0 -1
- package/dist/interfaces/lua.js +0 -6
- package/dist/interfaces/lua.js.map +0 -1
- package/dist/interfaces/marketplace.d.ts +0 -171
- package/dist/interfaces/marketplace.d.ts.map +0 -1
- package/dist/interfaces/marketplace.js +0 -3
- package/dist/interfaces/marketplace.js.map +0 -1
- package/dist/interfaces/mcp.d.ts +0 -96
- package/dist/interfaces/mcp.d.ts.map +0 -1
- package/dist/interfaces/mcp.js +0 -9
- package/dist/interfaces/mcp.js.map +0 -1
- package/dist/interfaces/message.d.ts +0 -16
- package/dist/interfaces/message.d.ts.map +0 -1
- package/dist/interfaces/message.js +0 -2
- package/dist/interfaces/message.js.map +0 -1
- package/dist/interfaces/orders.d.ts +0 -68
- package/dist/interfaces/orders.d.ts.map +0 -1
- package/dist/interfaces/orders.js +0 -20
- package/dist/interfaces/orders.js.map +0 -1
- package/dist/interfaces/persona.d.ts +0 -44
- package/dist/interfaces/persona.d.ts.map +0 -1
- package/dist/interfaces/persona.js +0 -6
- package/dist/interfaces/persona.js.map +0 -1
- package/dist/interfaces/postprocessors.d.ts +0 -15
- package/dist/interfaces/postprocessors.d.ts.map +0 -1
- package/dist/interfaces/postprocessors.js +0 -5
- package/dist/interfaces/postprocessors.js.map +0 -1
- package/dist/interfaces/preprocessors.d.ts +0 -15
- package/dist/interfaces/preprocessors.d.ts.map +0 -1
- package/dist/interfaces/preprocessors.js +0 -5
- package/dist/interfaces/preprocessors.js.map +0 -1
- package/dist/interfaces/product.d.ts +0 -92
- package/dist/interfaces/product.d.ts.map +0 -1
- package/dist/interfaces/product.js +0 -6
- package/dist/interfaces/product.js.map +0 -1
- package/dist/interfaces/push.d.ts +0 -27
- package/dist/interfaces/push.d.ts.map +0 -1
- package/dist/interfaces/push.js +0 -5
- package/dist/interfaces/push.js.map +0 -1
- package/dist/interfaces/skills.d.ts +0 -137
- package/dist/interfaces/skills.d.ts.map +0 -1
- package/dist/interfaces/skills.js +0 -6
- package/dist/interfaces/skills.js.map +0 -1
- package/dist/interfaces/test.d.ts +0 -37
- package/dist/interfaces/test.d.ts.map +0 -1
- package/dist/interfaces/test.js +0 -5
- package/dist/interfaces/test.js.map +0 -1
- package/dist/interfaces/unifiedto.d.ts +0 -141
- package/dist/interfaces/unifiedto.d.ts.map +0 -1
- package/dist/interfaces/unifiedto.js +0 -6
- package/dist/interfaces/unifiedto.js.map +0 -1
- package/dist/interfaces/user.d.ts +0 -75
- package/dist/interfaces/user.d.ts.map +0 -1
- package/dist/interfaces/user.js +0 -2
- package/dist/interfaces/user.js.map +0 -1
- package/dist/interfaces/webhooks.d.ts +0 -97
- package/dist/interfaces/webhooks.d.ts.map +0 -1
- package/dist/interfaces/webhooks.js +0 -6
- package/dist/interfaces/webhooks.js.map +0 -1
- package/dist/interfaces/whatsapp-templates.d.ts +0 -105
- package/dist/interfaces/whatsapp-templates.d.ts.map +0 -1
- package/dist/interfaces/whatsapp-templates.js +0 -6
- package/dist/interfaces/whatsapp-templates.js.map +0 -1
- package/dist/primitives/agent.handler.d.ts +0 -71
- package/dist/primitives/agent.handler.d.ts.map +0 -1
- package/dist/primitives/agent.handler.js +0 -226
- package/dist/primitives/agent.handler.js.map +0 -1
- package/dist/primitives/base.handler.d.ts +0 -229
- package/dist/primitives/base.handler.d.ts.map +0 -1
- package/dist/primitives/base.handler.js +0 -620
- package/dist/primitives/base.handler.js.map +0 -1
- package/dist/primitives/device-trigger.handler.d.ts +0 -56
- package/dist/primitives/device-trigger.handler.d.ts.map +0 -1
- package/dist/primitives/device-trigger.handler.js +0 -99
- package/dist/primitives/device-trigger.handler.js.map +0 -1
- package/dist/primitives/device.handler.d.ts +0 -57
- package/dist/primitives/device.handler.d.ts.map +0 -1
- package/dist/primitives/device.handler.js +0 -103
- package/dist/primitives/device.handler.js.map +0 -1
- package/dist/primitives/index.d.ts +0 -51
- package/dist/primitives/index.d.ts.map +0 -1
- package/dist/primitives/index.js +0 -75
- package/dist/primitives/index.js.map +0 -1
- package/dist/primitives/job.handler.d.ts +0 -53
- package/dist/primitives/job.handler.d.ts.map +0 -1
- package/dist/primitives/job.handler.js +0 -110
- package/dist/primitives/job.handler.js.map +0 -1
- package/dist/primitives/mcp-server.handler.d.ts +0 -93
- package/dist/primitives/mcp-server.handler.d.ts.map +0 -1
- package/dist/primitives/mcp-server.handler.js +0 -216
- package/dist/primitives/mcp-server.handler.js.map +0 -1
- package/dist/primitives/postprocessor.handler.d.ts +0 -44
- package/dist/primitives/postprocessor.handler.d.ts.map +0 -1
- package/dist/primitives/postprocessor.handler.js +0 -71
- package/dist/primitives/postprocessor.handler.js.map +0 -1
- package/dist/primitives/preprocessor.handler.d.ts +0 -44
- package/dist/primitives/preprocessor.handler.d.ts.map +0 -1
- package/dist/primitives/preprocessor.handler.js +0 -72
- package/dist/primitives/preprocessor.handler.js.map +0 -1
- package/dist/primitives/skill.handler.d.ts +0 -47
- package/dist/primitives/skill.handler.d.ts.map +0 -1
- package/dist/primitives/skill.handler.js +0 -229
- package/dist/primitives/skill.handler.js.map +0 -1
- package/dist/primitives/types.d.ts +0 -91
- package/dist/primitives/types.d.ts.map +0 -1
- package/dist/primitives/types.js +0 -17
- package/dist/primitives/types.js.map +0 -1
- package/dist/primitives/webhook.handler.d.ts +0 -47
- package/dist/primitives/webhook.handler.d.ts.map +0 -1
- package/dist/primitives/webhook.handler.js +0 -87
- package/dist/primitives/webhook.handler.js.map +0 -1
- package/dist/services/analytics.d.ts +0 -57
- package/dist/services/analytics.d.ts.map +0 -1
- package/dist/services/analytics.js +0 -317
- package/dist/services/analytics.js.map +0 -1
- package/dist/services/auth.d.ts +0 -72
- package/dist/services/auth.d.ts.map +0 -1
- package/dist/services/auth.js +0 -173
- package/dist/services/auth.js.map +0 -1
- package/dist/services/sandbox.service.d.ts +0 -105
- package/dist/services/sandbox.service.d.ts.map +0 -1
- package/dist/services/sandbox.service.js +0 -531
- package/dist/services/sandbox.service.js.map +0 -1
- package/dist/types/api-contracts.d.ts +0 -287
- package/dist/types/api-contracts.d.ts.map +0 -1
- package/dist/types/api-contracts.js +0 -2
- package/dist/types/api-contracts.js.map +0 -1
- package/dist/types/index.d.ts +0 -28
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -30
- package/dist/types/index.js.map +0 -1
- package/dist/types/skill.d.ts +0 -1079
- package/dist/types/skill.d.ts.map +0 -1
- package/dist/types/skill.js +0 -688
- package/dist/types/skill.js.map +0 -1
- package/dist/types/tool-validation.d.ts +0 -35
- package/dist/types/tool-validation.d.ts.map +0 -1
- package/dist/types/tool-validation.js +0 -43
- package/dist/types/tool-validation.js.map +0 -1
- package/dist/types/yaml.types.d.ts +0 -91
- package/dist/types/yaml.types.d.ts.map +0 -1
- package/dist/types/yaml.types.js +0 -5
- package/dist/types/yaml.types.js.map +0 -1
- package/dist/utils/aliases.d.ts +0 -7
- package/dist/utils/aliases.d.ts.map +0 -1
- package/dist/utils/aliases.js +0 -492
- package/dist/utils/aliases.js.map +0 -1
- package/dist/utils/artifact-loader.d.ts +0 -152
- package/dist/utils/artifact-loader.d.ts.map +0 -1
- package/dist/utils/artifact-loader.js +0 -284
- package/dist/utils/artifact-loader.js.map +0 -1
- package/dist/utils/auth-flows.d.ts +0 -55
- package/dist/utils/auth-flows.d.ts.map +0 -1
- package/dist/utils/auth-flows.js +0 -246
- package/dist/utils/auth-flows.js.map +0 -1
- package/dist/utils/backup-helpers.d.ts +0 -238
- package/dist/utils/backup-helpers.d.ts.map +0 -1
- package/dist/utils/backup-helpers.js +0 -704
- package/dist/utils/backup-helpers.js.map +0 -1
- package/dist/utils/build-manifest-from-disk.d.ts +0 -8
- package/dist/utils/build-manifest-from-disk.d.ts.map +0 -1
- package/dist/utils/build-manifest-from-disk.js +0 -21
- package/dist/utils/build-manifest-from-disk.js.map +0 -1
- package/dist/utils/bundle-upload.d.ts +0 -42
- package/dist/utils/bundle-upload.d.ts.map +0 -1
- package/dist/utils/bundle-upload.js +0 -90
- package/dist/utils/bundle-upload.js.map +0 -1
- package/dist/utils/chat-attachments.d.ts +0 -15
- package/dist/utils/chat-attachments.d.ts.map +0 -1
- package/dist/utils/chat-attachments.js +0 -116
- package/dist/utils/chat-attachments.js.map +0 -1
- package/dist/utils/cli.d.ts +0 -62
- package/dist/utils/cli.d.ts.map +0 -1
- package/dist/utils/cli.js +0 -198
- package/dist/utils/cli.js.map +0 -1
- package/dist/utils/command-utils.d.ts +0 -46
- package/dist/utils/command-utils.d.ts.map +0 -1
- package/dist/utils/command-utils.js +0 -74
- package/dist/utils/command-utils.js.map +0 -1
- package/dist/utils/deploy-helpers.d.ts +0 -40
- package/dist/utils/deploy-helpers.d.ts.map +0 -1
- package/dist/utils/deploy-helpers.js +0 -76
- package/dist/utils/deploy-helpers.js.map +0 -1
- package/dist/utils/env-loader.utils.d.ts +0 -19
- package/dist/utils/env-loader.utils.d.ts.map +0 -1
- package/dist/utils/env-loader.utils.js +0 -90
- package/dist/utils/env-loader.utils.js.map +0 -1
- package/dist/utils/files.d.ts +0 -65
- package/dist/utils/files.d.ts.map +0 -1
- package/dist/utils/files.js +0 -193
- package/dist/utils/files.js.map +0 -1
- package/dist/utils/hints.d.ts +0 -81
- package/dist/utils/hints.d.ts.map +0 -1
- package/dist/utils/hints.js +0 -81
- package/dist/utils/hints.js.map +0 -1
- package/dist/utils/init-agent.d.ts +0 -86
- package/dist/utils/init-agent.d.ts.map +0 -1
- package/dist/utils/init-agent.js +0 -201
- package/dist/utils/init-agent.js.map +0 -1
- package/dist/utils/init-helpers.d.ts +0 -37
- package/dist/utils/init-helpers.d.ts.map +0 -1
- package/dist/utils/init-helpers.js +0 -78
- package/dist/utils/init-helpers.js.map +0 -1
- package/dist/utils/init-prompts.d.ts +0 -74
- package/dist/utils/init-prompts.d.ts.map +0 -1
- package/dist/utils/init-prompts.js +0 -256
- package/dist/utils/init-prompts.js.map +0 -1
- package/dist/utils/prompt-handler.d.ts +0 -17
- package/dist/utils/prompt-handler.d.ts.map +0 -1
- package/dist/utils/prompt-handler.js +0 -49
- package/dist/utils/prompt-handler.js.map +0 -1
- package/dist/utils/sandbox-storage.d.ts +0 -83
- package/dist/utils/sandbox-storage.d.ts.map +0 -1
- package/dist/utils/sandbox-storage.js +0 -211
- package/dist/utils/sandbox-storage.js.map +0 -1
- package/dist/utils/sandbox.d.ts +0 -76
- package/dist/utils/sandbox.d.ts.map +0 -1
- package/dist/utils/sandbox.js +0 -664
- package/dist/utils/sandbox.js.map +0 -1
- package/dist/utils/semver.d.ts +0 -40
- package/dist/utils/semver.d.ts.map +0 -1
- package/dist/utils/semver.js +0 -99
- package/dist/utils/semver.js.map +0 -1
- package/dist/utils/suggest.d.ts +0 -3
- package/dist/utils/suggest.d.ts.map +0 -1
- package/dist/utils/suggest.js +0 -32
- package/dist/utils/suggest.js.map +0 -1
- package/dist/utils/sync-display.d.ts +0 -28
- package/dist/utils/sync-display.d.ts.map +0 -1
- package/dist/utils/sync-display.js +0 -168
- package/dist/utils/sync-display.js.map +0 -1
- package/dist/utils/sync-fetch.d.ts +0 -108
- package/dist/utils/sync-fetch.d.ts.map +0 -1
- package/dist/utils/sync-fetch.js +0 -294
- package/dist/utils/sync-fetch.js.map +0 -1
- package/dist/utils/sync-helpers.d.ts +0 -7
- package/dist/utils/sync-helpers.d.ts.map +0 -1
- package/dist/utils/sync-helpers.js +0 -7
- package/dist/utils/sync-helpers.js.map +0 -1
- package/dist/utils/version-check.d.ts +0 -37
- package/dist/utils/version-check.d.ts.map +0 -1
- package/dist/utils/version-check.js +0 -117
- package/dist/utils/version-check.js.map +0 -1
- package/dist/utils/write-info.d.ts +0 -9
- package/dist/utils/write-info.d.ts.map +0 -1
- package/dist/utils/write-info.js +0 -11
- package/dist/utils/write-info.js.map +0 -1
- package/node_modules/@lua/shared-source-sync/dist/index.d.mts +0 -424
- package/node_modules/@lua/shared-source-sync/dist/index.d.ts +0 -424
- package/node_modules/@lua/shared-source-sync/dist/index.js +0 -536
- package/node_modules/@lua/shared-source-sync/dist/index.mjs +0 -491
- package/node_modules/@lua/shared-source-sync/package.json +0 -26
- package/node_modules/@lua/shared-source-sync/src/archive.ts +0 -98
- package/node_modules/@lua/shared-source-sync/src/filter.ts +0 -72
- package/node_modules/@lua/shared-source-sync/src/hash.ts +0 -40
- package/node_modules/@lua/shared-source-sync/src/http.ts +0 -132
- package/node_modules/@lua/shared-source-sync/src/index.ts +0 -56
- package/node_modules/@lua/shared-source-sync/src/pull.ts +0 -50
- package/node_modules/@lua/shared-source-sync/src/push.ts +0 -94
- package/node_modules/@lua/shared-source-sync/src/restore.ts +0 -83
- package/node_modules/@lua/shared-source-sync/src/skill-source.ts +0 -55
- package/node_modules/@lua/shared-source-sync/src/transfer.ts +0 -92
- package/node_modules/@lua/shared-source-sync/src/types.ts +0 -88
- package/node_modules/@lua/shared-source-sync/src/walk.ts +0 -91
- package/node_modules/@lua/shared-source-sync/tests/archive.test.ts +0 -108
- package/node_modules/@lua/shared-source-sync/tests/hash.test.ts +0 -40
- package/node_modules/@lua/shared-source-sync/tests/http.test.ts +0 -77
- package/node_modules/@lua/shared-source-sync/tests/push.test.ts +0 -162
- package/node_modules/@lua/shared-source-sync/tests/walk.test.ts +0 -84
- package/node_modules/@lua/shared-source-sync/tsconfig.json +0 -12
- package/node_modules/@lua/shared-source-sync/tsup.config.ts +0 -9
- package/node_modules/@lua/shared-source-sync/vitest.config.ts +0 -8
- package/node_modules/@lua/shared-types/dist/index.d.mts +0 -619
- package/node_modules/@lua/shared-types/dist/index.d.ts +0 -619
- package/node_modules/@lua/shared-types/dist/index.js +0 -435
- package/node_modules/@lua/shared-types/dist/index.mjs +0 -394
- package/node_modules/@lua/shared-types/package.json +0 -26
- package/node_modules/@lua/shared-types/src/agent-config.types.ts +0 -45
- package/node_modules/@lua/shared-types/src/agent-invocation.types.ts +0 -73
- package/node_modules/@lua/shared-types/src/ai-generate.types.ts +0 -74
- package/node_modules/@lua/shared-types/src/ai-generate.utils.ts +0 -16
- package/node_modules/@lua/shared-types/src/channel.type.ts +0 -23
- package/node_modules/@lua/shared-types/src/chat-history.types.ts +0 -112
- package/node_modules/@lua/shared-types/src/chat-stream.types.ts +0 -18
- package/node_modules/@lua/shared-types/src/client-tools.types.ts +0 -47
- package/node_modules/@lua/shared-types/src/device.types.ts +0 -190
- package/node_modules/@lua/shared-types/src/index.ts +0 -15
- package/node_modules/@lua/shared-types/src/model-registry.ts +0 -26
- package/node_modules/@lua/shared-types/src/persona-defaults.ts +0 -59
- package/node_modules/@lua/shared-types/src/persona-text.type.ts +0 -92
- package/node_modules/@lua/shared-types/src/sandbox-contract.ts +0 -63
- package/node_modules/@lua/shared-types/src/unstructured-types.ts +0 -58
- package/node_modules/@lua/shared-types/src/vm-execution-log.types.ts +0 -41
- package/node_modules/@lua/shared-types/tsconfig.json +0 -12
- package/node_modules/@lua/shared-types/tsup.config.ts +0 -9
- package/scripts/resolve-workspace-deps.cjs +0 -61
- /package/dist/{compiler/utils/zod-runtime.mjs → zod-runtime.mjs} +0 -0
package/scripts/build-vendor.mjs
CHANGED
|
@@ -24,7 +24,10 @@ const __dirname = path.dirname(__filename);
|
|
|
24
24
|
|
|
25
25
|
const packageRoot = path.resolve(__dirname, '..');
|
|
26
26
|
const entry = path.join(packageRoot, 'scripts', 'vendor-entry.mjs');
|
|
27
|
-
|
|
27
|
+
// Flat at dist/ so package-root.ts can resolve it without depending on the
|
|
28
|
+
// bundled dist structure (which tsup flattens — there's no dist/compiler/
|
|
29
|
+
// directory after the move to a bundler).
|
|
30
|
+
const outdir = path.join(packageRoot, 'dist');
|
|
28
31
|
const outfile = path.join(outdir, 'zod-runtime.mjs');
|
|
29
32
|
|
|
30
33
|
await fs.mkdir(outdir, { recursive: true });
|
|
@@ -48,6 +51,6 @@ const stat = await fs.stat(outfile);
|
|
|
48
51
|
const sizeKb = (stat.size / 1024).toFixed(1);
|
|
49
52
|
|
|
50
53
|
const inputs = Object.keys(result.metafile.inputs).filter(
|
|
51
|
-
(p) => p.includes('node_modules/zod') || p.includes('node_modules/zod-to-json-schema')
|
|
54
|
+
(p) => p.includes('node_modules/zod') || p.includes('node_modules/zod-to-json-schema')
|
|
52
55
|
);
|
|
53
|
-
console.log(`✅ Vendored ${inputs.length} files into dist/
|
|
56
|
+
console.log(`✅ Vendored ${inputs.length} files into dist/zod-runtime.mjs (${sizeKb} KB)`);
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Produces final `.d.ts` files in `dist/` for lua-cli's public entry
|
|
4
|
+
* points, starting from `tsc --emitDeclarationOnly` output in `temp/dts/`.
|
|
5
|
+
*
|
|
6
|
+
* Two strategies depending on the entry:
|
|
7
|
+
*
|
|
8
|
+
* - **rolled**: api-extractor reads `temp/dts/<entry>.d.ts`, follows
|
|
9
|
+
* the type graph, inlines workspace types listed in base.json's
|
|
10
|
+
* `bundledPackages`, and writes a single self-contained `.d.ts` to
|
|
11
|
+
* `dist/<entry>.d.ts`. Used for entries whose graph touches `@lua/*`
|
|
12
|
+
* types that aren't published to npm.
|
|
13
|
+
*
|
|
14
|
+
* - **raw**: copy `temp/dts/<src>` straight to `dist/<dest>` with no
|
|
15
|
+
* rollup. Used for entries that have no `@lua/*` references AND no
|
|
16
|
+
* local transitive refs — currently the CLI bin (just `export {};`)
|
|
17
|
+
* and `voice-exports` (pure namespace re-exports of `@livekit/*`
|
|
18
|
+
* packages that end users get via lua-cli's own runtime deps).
|
|
19
|
+
*
|
|
20
|
+
* Why a split: api-extractor crashes on `export * as ns from '<external>'`
|
|
21
|
+
* patterns (a documented limitation — namespace re-exports of external
|
|
22
|
+
* modules aren't supported). `voice-exports` has 5 of those, but it also
|
|
23
|
+
* has zero `@lua/*` references, so there's nothing to roll up; a plain
|
|
24
|
+
* copy does the job.
|
|
25
|
+
*
|
|
26
|
+
* When adding a new entry point in `tsup.config.ts`:
|
|
27
|
+
* - If its type graph references any `@lua/*` package, add
|
|
28
|
+
* `api-extractor/<slug>.json` extending base.json and append the
|
|
29
|
+
* slug to `rolledEntries` below.
|
|
30
|
+
* - Otherwise, add a `{ src, dest }` pair to `rawEntries`.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
import { Extractor, ExtractorConfig } from '@microsoft/api-extractor';
|
|
34
|
+
import fs from 'node:fs/promises';
|
|
35
|
+
import path from 'node:path';
|
|
36
|
+
import { fileURLToPath } from 'node:url';
|
|
37
|
+
|
|
38
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
39
|
+
const packageRoot = path.resolve(__dirname, '..');
|
|
40
|
+
const configDir = path.join(packageRoot, 'api-extractor');
|
|
41
|
+
const tempDtsDir = path.join(packageRoot, 'temp', 'dts');
|
|
42
|
+
const distDir = path.join(packageRoot, 'dist');
|
|
43
|
+
|
|
44
|
+
const rolledEntries = ['api-exports', 'voice-test'];
|
|
45
|
+
|
|
46
|
+
const rawEntries = [
|
|
47
|
+
{ src: 'index.d.ts', dest: 'index.d.ts' },
|
|
48
|
+
{ src: 'voice-exports.d.ts', dest: 'voice-exports.d.ts' },
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
let hadErrors = false;
|
|
52
|
+
|
|
53
|
+
for (const entry of rolledEntries) {
|
|
54
|
+
const configPath = path.join(configDir, `${entry}.json`);
|
|
55
|
+
const config = ExtractorConfig.loadFileAndPrepare(configPath);
|
|
56
|
+
const result = Extractor.invoke(config, {
|
|
57
|
+
localBuild: process.env.CI !== 'true',
|
|
58
|
+
showVerboseMessages: false,
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
if (!result.succeeded) {
|
|
62
|
+
console.error(`❌ api-extractor: ${entry} — ${result.errorCount} error(s), ${result.warningCount} warning(s)`);
|
|
63
|
+
hadErrors = true;
|
|
64
|
+
} else if (result.warningCount > 0) {
|
|
65
|
+
console.log(`⚠️ api-extractor: ${entry} — ok with ${result.warningCount} warning(s)`);
|
|
66
|
+
} else {
|
|
67
|
+
console.log(`✅ api-extractor: ${entry}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (hadErrors) process.exit(1);
|
|
72
|
+
|
|
73
|
+
for (const { src, dest } of rawEntries) {
|
|
74
|
+
const from = path.join(tempDtsDir, src);
|
|
75
|
+
const to = path.join(distDir, dest);
|
|
76
|
+
await fs.mkdir(path.dirname(to), { recursive: true });
|
|
77
|
+
await fs.copyFile(from, to);
|
|
78
|
+
console.log(`📋 raw copy: temp/dts/${src} → dist/${dest}`);
|
|
79
|
+
}
|
package/template/package.json
CHANGED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from './http.client.js';
|
|
2
|
-
import { ApiResponse } from '../interfaces/common.js';
|
|
3
|
-
import { AgentType } from '../interfaces/agent.js';
|
|
4
|
-
import { ApprovedModel } from '../interfaces/agent.js';
|
|
5
|
-
import { CreateAgentRequest } from '../interfaces/agent.js';
|
|
6
|
-
import { CreateAgentResponse } from '../interfaces/agent.js';
|
|
7
|
-
import { Agent } from '../interfaces/agent.js';
|
|
8
|
-
import { UpdateAgentRequest } from '../interfaces/agent.js';
|
|
9
|
-
import { AgentChannelsResponse } from '../interfaces/agent.js';
|
|
10
|
-
import { CreateWhatsAppChannelRequest } from '../interfaces/agent.js';
|
|
11
|
-
import { CreateWhatsAppChannelResponse } from '../interfaces/agent.js';
|
|
12
|
-
import { CreateFacebookChannelRequest } from '../interfaces/agent.js';
|
|
13
|
-
import { CreateFacebookChannelResponse } from '../interfaces/agent.js';
|
|
14
|
-
import { CreateSlackChannelRequest } from '../interfaces/agent.js';
|
|
15
|
-
import { CreateSlackChannelResponse } from '../interfaces/agent.js';
|
|
16
|
-
import { CreateEmailChannelRequest } from '../interfaces/agent.js';
|
|
17
|
-
import { CreateEmailChannelResponse } from '../interfaces/agent.js';
|
|
18
|
-
import { GetAgentFeaturesResponse } from '../interfaces/agent.js';
|
|
19
|
-
import { UpdateAgentFeatureRequest } from '../interfaces/agent.js';
|
|
20
|
-
import { UpdateAgentFeatureResponse } from '../interfaces/agent.js';
|
|
21
|
-
import { DuplicateAgentRequest } from '../interfaces/agent.js';
|
|
22
|
-
import { DuplicateAgentResponse } from '../interfaces/agent.js';
|
|
23
|
-
/**
|
|
24
|
-
* Agent API calls
|
|
25
|
-
*/
|
|
26
|
-
export default class AgentApi extends HttpClient {
|
|
27
|
-
private apiKey;
|
|
28
|
-
/**
|
|
29
|
-
* Creates an instance of AgentApi
|
|
30
|
-
* @param baseUrl - The base URL for the API
|
|
31
|
-
* @param apiKey - The API key for authentication
|
|
32
|
-
*/
|
|
33
|
-
constructor(baseUrl: string, apiKey: string);
|
|
34
|
-
/**
|
|
35
|
-
* Retrieves all available agent types that can be created
|
|
36
|
-
* @returns Promise resolving to an ApiResponse containing an array of AgentType objects
|
|
37
|
-
* @throws Error if the API request fails
|
|
38
|
-
*/
|
|
39
|
-
getAgentTypes(): Promise<ApiResponse<AgentType[]>>;
|
|
40
|
-
/**
|
|
41
|
-
* Retrieves all approved LLM models available for agents.
|
|
42
|
-
* Optionally filter by provider (e.g. 'openai', 'google', 'anthropic').
|
|
43
|
-
* @param provider - Optional provider filter
|
|
44
|
-
* @returns Promise resolving to an ApiResponse containing an array of ApprovedModel objects
|
|
45
|
-
*/
|
|
46
|
-
getApprovedModels(provider?: string): Promise<ApiResponse<ApprovedModel[]>>;
|
|
47
|
-
/**
|
|
48
|
-
* Creates a new agent with the provided configuration
|
|
49
|
-
* @param agentData - The agent configuration data including name, type, and other settings
|
|
50
|
-
* @returns Promise resolving to an ApiResponse containing the created agent details
|
|
51
|
-
* @throws Error if the API request fails or agent creation is unsuccessful
|
|
52
|
-
*/
|
|
53
|
-
createAgent(agentData: CreateAgentRequest): Promise<ApiResponse<CreateAgentResponse>>;
|
|
54
|
-
/**
|
|
55
|
-
* Retrieves detailed information about a specific agent
|
|
56
|
-
* @param agentId - The unique identifier of the agent to retrieve
|
|
57
|
-
* @returns Promise resolving to an ApiResponse containing the Agent details
|
|
58
|
-
* @throws Error if the API request fails or the agent is not found
|
|
59
|
-
*/
|
|
60
|
-
getAgent(agentId: string): Promise<ApiResponse<Agent>>;
|
|
61
|
-
/**
|
|
62
|
-
* Retrieves all communication channels connected to a specific agent
|
|
63
|
-
* @param agentId - The unique identifier of the agent
|
|
64
|
-
* @returns Promise resolving to an ApiResponse containing channels and available channel links
|
|
65
|
-
* @throws Error if the API request fails or the agent is not found
|
|
66
|
-
*/
|
|
67
|
-
getAgentChannels(agentId: string): Promise<ApiResponse<AgentChannelsResponse>>;
|
|
68
|
-
/**
|
|
69
|
-
* Creates a new WhatsApp channel for a specific agent
|
|
70
|
-
* @param agentId - The unique identifier of the agent
|
|
71
|
-
* @param channelData - The WhatsApp channel configuration including phoneNumberId, wabaId, and accessToken
|
|
72
|
-
* @returns Promise resolving to an ApiResponse containing the created WhatsApp channel details
|
|
73
|
-
* @throws Error if the API request fails or the channel creation is unsuccessful
|
|
74
|
-
*/
|
|
75
|
-
createWhatsAppChannel(agentId: string, channelData: CreateWhatsAppChannelRequest): Promise<ApiResponse<CreateWhatsAppChannelResponse>>;
|
|
76
|
-
/**
|
|
77
|
-
* Creates a new Facebook Messenger channel for a specific agent
|
|
78
|
-
* @param agentId - The unique identifier of the agent
|
|
79
|
-
* @param channelData - The Facebook channel configuration including accessToken and pageId
|
|
80
|
-
* @returns Promise resolving to an ApiResponse containing the created Facebook channel details
|
|
81
|
-
* @throws Error if the API request fails or the channel creation is unsuccessful
|
|
82
|
-
*/
|
|
83
|
-
createFacebookChannel(agentId: string, channelData: CreateFacebookChannelRequest): Promise<ApiResponse<CreateFacebookChannelResponse>>;
|
|
84
|
-
/**
|
|
85
|
-
* Creates a new Slack channel for a specific agent (supports both private and public channels)
|
|
86
|
-
* @param agentId - The unique identifier of the agent
|
|
87
|
-
* @param channelData - The Slack channel configuration
|
|
88
|
-
* - For private: requires accessToken
|
|
89
|
-
* - For public: requires appId, clientId, and clientSecret
|
|
90
|
-
* @returns Promise resolving to an ApiResponse containing the created Slack channel details
|
|
91
|
-
* - Private channels return bot configuration and workspace details
|
|
92
|
-
* - Public channels return OAuth configuration and redirect URI
|
|
93
|
-
* @throws Error if the API request fails or the channel creation is unsuccessful
|
|
94
|
-
*/
|
|
95
|
-
createSlackChannel(agentId: string, channelData: CreateSlackChannelRequest): Promise<ApiResponse<CreateSlackChannelResponse>>;
|
|
96
|
-
/**
|
|
97
|
-
* Creates a new Email channel for a specific agent
|
|
98
|
-
* @param agentId - The unique identifier of the agent
|
|
99
|
-
* @param channelData - The Email channel configuration including sender name and email address
|
|
100
|
-
* @returns Promise resolving to an ApiResponse containing the forward-to email address
|
|
101
|
-
* @throws Error if the API request fails or the channel creation is unsuccessful
|
|
102
|
-
*/
|
|
103
|
-
createEmailChannel(agentId: string, channelData: CreateEmailChannelRequest): Promise<ApiResponse<CreateEmailChannelResponse>>;
|
|
104
|
-
/**
|
|
105
|
-
* Retrieves all features configured for a specific agent
|
|
106
|
-
* @param agentId - The unique identifier of the agent
|
|
107
|
-
* @returns Promise resolving to an ApiResponse containing an array of agent features
|
|
108
|
-
* @throws Error if the API request fails or the agent is not found
|
|
109
|
-
* @example
|
|
110
|
-
* const features = await agentApi.getAgentFeatures('baseAgent_agent_123');
|
|
111
|
-
* features.data.features.forEach(feature => {
|
|
112
|
-
* console.log(`${feature.title}: ${feature.active ? 'enabled' : 'disabled'}`);
|
|
113
|
-
* });
|
|
114
|
-
*/
|
|
115
|
-
getAgentFeatures(agentId: string): Promise<ApiResponse<GetAgentFeaturesResponse>>;
|
|
116
|
-
/**
|
|
117
|
-
* Updates a specific feature for an agent
|
|
118
|
-
* @param agentId - The unique identifier of the agent
|
|
119
|
-
* @param featureData - The feature update configuration
|
|
120
|
-
* @param featureData.featureName - The name of the feature to update (required)
|
|
121
|
-
* @param featureData.active - Whether the feature should be enabled or disabled (optional)
|
|
122
|
-
* @param featureData.featureContext - Custom context/instructions for the feature (optional)
|
|
123
|
-
* @returns Promise resolving to an ApiResponse with success message
|
|
124
|
-
* @throws Error if the API request fails, the agent/feature is not found, or neither active nor featureContext is provided
|
|
125
|
-
* @example
|
|
126
|
-
* // Enable a feature
|
|
127
|
-
* await agentApi.updateAgentFeature('baseAgent_agent_123', {
|
|
128
|
-
* featureName: 'inquiry',
|
|
129
|
-
* active: true
|
|
130
|
-
* });
|
|
131
|
-
*
|
|
132
|
-
* // Update feature context
|
|
133
|
-
* await agentApi.updateAgentFeature('baseAgent_agent_123', {
|
|
134
|
-
* featureName: 'inquiry',
|
|
135
|
-
* featureContext: 'Custom instructions for inquiry forms'
|
|
136
|
-
* });
|
|
137
|
-
*
|
|
138
|
-
* // Update both
|
|
139
|
-
* await agentApi.updateAgentFeature('baseAgent_agent_123', {
|
|
140
|
-
* featureName: 'rag',
|
|
141
|
-
* active: true,
|
|
142
|
-
* featureContext: 'Enhanced RAG search instructions'
|
|
143
|
-
* });
|
|
144
|
-
*/
|
|
145
|
-
updateAgentFeature(agentId: string, featureData: UpdateAgentFeatureRequest): Promise<ApiResponse<UpdateAgentFeatureResponse>>;
|
|
146
|
-
/**
|
|
147
|
-
* Updates the agent with partial data (without creating a new persona version)
|
|
148
|
-
* @param agentId - The full agent ID (e.g., baseAgent_agent_xxx)
|
|
149
|
-
* @param updateData - Partial update data (name, persona, metadata, etc.)
|
|
150
|
-
* @returns Promise resolving to an ApiResponse with the updated agent
|
|
151
|
-
* @throws Error if the API request fails
|
|
152
|
-
*/
|
|
153
|
-
updateAgent(agentId: string, updateData: UpdateAgentRequest): Promise<ApiResponse<Agent>>;
|
|
154
|
-
/**
|
|
155
|
-
* Duplicates a sub-agent into a brand-new agent (same or cross-org).
|
|
156
|
-
* Routes through the admin endpoint:
|
|
157
|
-
* POST /admin/orgs/:orgId/agents/:baseAgentId/sub-agent/:agentId/duplicate
|
|
158
|
-
*
|
|
159
|
-
* @param orgId - The source org ID (caller must be admin)
|
|
160
|
-
* @param sourceAgentId - The full source agentId (e.g. `${baseAgentId}_agent-<ts>-<rand>`)
|
|
161
|
-
* @param data - Request body (targetOrgId/userId, newName, include flags)
|
|
162
|
-
*/
|
|
163
|
-
duplicateAgent(orgId: string, sourceAgentId: string, data: DuplicateAgentRequest): Promise<ApiResponse<DuplicateAgentResponse>>;
|
|
164
|
-
}
|
|
165
|
-
//# sourceMappingURL=agent.api.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent.api.service.d.ts","sourceRoot":"","sources":["../../src/api/agent.api.service.ts"],"names":[],"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wBAAwB,CAAC,CAAC;IAMvF;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACG,kBAAkB,CACtB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,yBAAyB,GACrC,OAAO,CAAC,WAAW,CAAC,0BAA0B,CAAC,CAAC;IAWnD;;;;;;OAMG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAgB/F;;;;;;;;OAQG;IACG,cAAc,CAClB,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;CAQhD"}
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from './http.client.js';
|
|
2
|
-
/**
|
|
3
|
-
* Agent API calls
|
|
4
|
-
*/
|
|
5
|
-
export default class AgentApi extends HttpClient {
|
|
6
|
-
/**
|
|
7
|
-
* Creates an instance of AgentApi
|
|
8
|
-
* @param baseUrl - The base URL for the API
|
|
9
|
-
* @param apiKey - The API key for authentication
|
|
10
|
-
*/
|
|
11
|
-
constructor(baseUrl, apiKey) {
|
|
12
|
-
super(baseUrl);
|
|
13
|
-
this.apiKey = apiKey;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Retrieves all available agent types that can be created
|
|
17
|
-
* @returns Promise resolving to an ApiResponse containing an array of AgentType objects
|
|
18
|
-
* @throws Error if the API request fails
|
|
19
|
-
*/
|
|
20
|
-
async getAgentTypes() {
|
|
21
|
-
return this.httpGet(`/agents/self-serve/types`, {
|
|
22
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Retrieves all approved LLM models available for agents.
|
|
27
|
-
* Optionally filter by provider (e.g. 'openai', 'google', 'anthropic').
|
|
28
|
-
* @param provider - Optional provider filter
|
|
29
|
-
* @returns Promise resolving to an ApiResponse containing an array of ApprovedModel objects
|
|
30
|
-
*/
|
|
31
|
-
async getApprovedModels(provider) {
|
|
32
|
-
const query = provider ? `?provider=${encodeURIComponent(provider)}` : '';
|
|
33
|
-
return this.httpGet(`/agents/self-serve/models${query}`, {
|
|
34
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Creates a new agent with the provided configuration
|
|
39
|
-
* @param agentData - The agent configuration data including name, type, and other settings
|
|
40
|
-
* @returns Promise resolving to an ApiResponse containing the created agent details
|
|
41
|
-
* @throws Error if the API request fails or agent creation is unsuccessful
|
|
42
|
-
*/
|
|
43
|
-
async createAgent(agentData) {
|
|
44
|
-
return this.httpPost(`/agents/self-serve/create`, agentData, {
|
|
45
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Retrieves detailed information about a specific agent
|
|
50
|
-
* @param agentId - The unique identifier of the agent to retrieve
|
|
51
|
-
* @returns Promise resolving to an ApiResponse containing the Agent details
|
|
52
|
-
* @throws Error if the API request fails or the agent is not found
|
|
53
|
-
*/
|
|
54
|
-
async getAgent(agentId) {
|
|
55
|
-
return this.httpGet(`/admin/agents/${agentId}`, {
|
|
56
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Retrieves all communication channels connected to a specific agent
|
|
61
|
-
* @param agentId - The unique identifier of the agent
|
|
62
|
-
* @returns Promise resolving to an ApiResponse containing channels and available channel links
|
|
63
|
-
* @throws Error if the API request fails or the agent is not found
|
|
64
|
-
*/
|
|
65
|
-
async getAgentChannels(agentId) {
|
|
66
|
-
return this.httpGet(`/admin/agents/${agentId}/channels`, {
|
|
67
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Creates a new WhatsApp channel for a specific agent
|
|
72
|
-
* @param agentId - The unique identifier of the agent
|
|
73
|
-
* @param channelData - The WhatsApp channel configuration including phoneNumberId, wabaId, and accessToken
|
|
74
|
-
* @returns Promise resolving to an ApiResponse containing the created WhatsApp channel details
|
|
75
|
-
* @throws Error if the API request fails or the channel creation is unsuccessful
|
|
76
|
-
*/
|
|
77
|
-
async createWhatsAppChannel(agentId, channelData) {
|
|
78
|
-
return this.httpPost(`/admin/agents/${agentId}/channels`, channelData, {
|
|
79
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Creates a new Facebook Messenger channel for a specific agent
|
|
84
|
-
* @param agentId - The unique identifier of the agent
|
|
85
|
-
* @param channelData - The Facebook channel configuration including accessToken and pageId
|
|
86
|
-
* @returns Promise resolving to an ApiResponse containing the created Facebook channel details
|
|
87
|
-
* @throws Error if the API request fails or the channel creation is unsuccessful
|
|
88
|
-
*/
|
|
89
|
-
async createFacebookChannel(agentId, channelData) {
|
|
90
|
-
return this.httpPost(`/admin/agents/${agentId}/channels`, channelData, {
|
|
91
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Creates a new Slack channel for a specific agent (supports both private and public channels)
|
|
96
|
-
* @param agentId - The unique identifier of the agent
|
|
97
|
-
* @param channelData - The Slack channel configuration
|
|
98
|
-
* - For private: requires accessToken
|
|
99
|
-
* - For public: requires appId, clientId, and clientSecret
|
|
100
|
-
* @returns Promise resolving to an ApiResponse containing the created Slack channel details
|
|
101
|
-
* - Private channels return bot configuration and workspace details
|
|
102
|
-
* - Public channels return OAuth configuration and redirect URI
|
|
103
|
-
* @throws Error if the API request fails or the channel creation is unsuccessful
|
|
104
|
-
*/
|
|
105
|
-
async createSlackChannel(agentId, channelData) {
|
|
106
|
-
return this.httpPost(`/admin/agents/${agentId}/channels`, channelData, {
|
|
107
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Creates a new Email channel for a specific agent
|
|
112
|
-
* @param agentId - The unique identifier of the agent
|
|
113
|
-
* @param channelData - The Email channel configuration including sender name and email address
|
|
114
|
-
* @returns Promise resolving to an ApiResponse containing the forward-to email address
|
|
115
|
-
* @throws Error if the API request fails or the channel creation is unsuccessful
|
|
116
|
-
*/
|
|
117
|
-
async createEmailChannel(agentId, channelData) {
|
|
118
|
-
return this.httpPost(`/admin/agents/${agentId}/channels`, channelData, {
|
|
119
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Retrieves all features configured for a specific agent
|
|
124
|
-
* @param agentId - The unique identifier of the agent
|
|
125
|
-
* @returns Promise resolving to an ApiResponse containing an array of agent features
|
|
126
|
-
* @throws Error if the API request fails or the agent is not found
|
|
127
|
-
* @example
|
|
128
|
-
* const features = await agentApi.getAgentFeatures('baseAgent_agent_123');
|
|
129
|
-
* features.data.features.forEach(feature => {
|
|
130
|
-
* console.log(`${feature.title}: ${feature.active ? 'enabled' : 'disabled'}`);
|
|
131
|
-
* });
|
|
132
|
-
*/
|
|
133
|
-
async getAgentFeatures(agentId) {
|
|
134
|
-
return this.httpGet(`/admin/agents/${agentId}/features`, {
|
|
135
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Updates a specific feature for an agent
|
|
140
|
-
* @param agentId - The unique identifier of the agent
|
|
141
|
-
* @param featureData - The feature update configuration
|
|
142
|
-
* @param featureData.featureName - The name of the feature to update (required)
|
|
143
|
-
* @param featureData.active - Whether the feature should be enabled or disabled (optional)
|
|
144
|
-
* @param featureData.featureContext - Custom context/instructions for the feature (optional)
|
|
145
|
-
* @returns Promise resolving to an ApiResponse with success message
|
|
146
|
-
* @throws Error if the API request fails, the agent/feature is not found, or neither active nor featureContext is provided
|
|
147
|
-
* @example
|
|
148
|
-
* // Enable a feature
|
|
149
|
-
* await agentApi.updateAgentFeature('baseAgent_agent_123', {
|
|
150
|
-
* featureName: 'inquiry',
|
|
151
|
-
* active: true
|
|
152
|
-
* });
|
|
153
|
-
*
|
|
154
|
-
* // Update feature context
|
|
155
|
-
* await agentApi.updateAgentFeature('baseAgent_agent_123', {
|
|
156
|
-
* featureName: 'inquiry',
|
|
157
|
-
* featureContext: 'Custom instructions for inquiry forms'
|
|
158
|
-
* });
|
|
159
|
-
*
|
|
160
|
-
* // Update both
|
|
161
|
-
* await agentApi.updateAgentFeature('baseAgent_agent_123', {
|
|
162
|
-
* featureName: 'rag',
|
|
163
|
-
* active: true,
|
|
164
|
-
* featureContext: 'Enhanced RAG search instructions'
|
|
165
|
-
* });
|
|
166
|
-
*/
|
|
167
|
-
async updateAgentFeature(agentId, featureData) {
|
|
168
|
-
// Validate that at least one optional field is provided
|
|
169
|
-
if (featureData.active === undefined && featureData.featureContext === undefined) {
|
|
170
|
-
throw new Error('At least one of "active" or "featureContext" must be provided');
|
|
171
|
-
}
|
|
172
|
-
return this.httpPut(`/admin/agents/${agentId}/features`, featureData, {
|
|
173
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Updates the agent with partial data (without creating a new persona version)
|
|
178
|
-
* @param agentId - The full agent ID (e.g., baseAgent_agent_xxx)
|
|
179
|
-
* @param updateData - Partial update data (name, persona, metadata, etc.)
|
|
180
|
-
* @returns Promise resolving to an ApiResponse with the updated agent
|
|
181
|
-
* @throws Error if the API request fails
|
|
182
|
-
*/
|
|
183
|
-
async updateAgent(agentId, updateData) {
|
|
184
|
-
const baseAgentId = agentId.split('_')[0];
|
|
185
|
-
const subAgentIdSuffix = agentId.replace(`${baseAgentId}_`, '');
|
|
186
|
-
return this.httpPatch(`/agents/${baseAgentId}/sub-agent`, {
|
|
187
|
-
id: subAgentIdSuffix,
|
|
188
|
-
...updateData,
|
|
189
|
-
}, {
|
|
190
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Duplicates a sub-agent into a brand-new agent (same or cross-org).
|
|
195
|
-
* Routes through the admin endpoint:
|
|
196
|
-
* POST /admin/orgs/:orgId/agents/:baseAgentId/sub-agent/:agentId/duplicate
|
|
197
|
-
*
|
|
198
|
-
* @param orgId - The source org ID (caller must be admin)
|
|
199
|
-
* @param sourceAgentId - The full source agentId (e.g. `${baseAgentId}_agent-<ts>-<rand>`)
|
|
200
|
-
* @param data - Request body (targetOrgId/userId, newName, include flags)
|
|
201
|
-
*/
|
|
202
|
-
async duplicateAgent(orgId, sourceAgentId, data) {
|
|
203
|
-
const baseAgentId = sourceAgentId.split('_')[0];
|
|
204
|
-
return this.httpPost(`/admin/orgs/${encodeURIComponent(orgId)}/agents/${encodeURIComponent(baseAgentId)}/sub-agent/${encodeURIComponent(sourceAgentId)}/duplicate`, data, { Authorization: `Bearer ${this.apiKey}` });
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
//# sourceMappingURL=agent.api.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent.api.service.js","sourceRoot":"","sources":["../../src/api/agent.api.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAuB9C;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,UAAU;IAG9C;;;;OAIG;IACH,YAAY,OAAe,EAAE,MAAc;QACzC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa;QACjB,OAAO,IAAI,CAAC,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C,MAAM,EAAE;SACvC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,WAAW,CAAC,OAAe,EAAE,UAA8B;QAC/D,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,MAAM,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,WAAW,GAAG,EAAE,EAAE,CAAC,CAAC;QAEhE,OAAO,IAAI,CAAC,SAAS,CACnB,WAAW,WAAW,YAAY,EAClC;YACE,EAAE,EAAE,gBAAgB;YACpB,GAAG,UAAU;SACd,EACD;YACE,aAAa,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE;SACvC,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,cAAc,CAClB,KAAa,EACb,aAAqB,EACrB,IAA2B;QAE3B,MAAM,WAAW,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC,QAAQ,CAClB,eAAe,kBAAkB,CAAC,KAAK,CAAC,WAAW,kBAAkB,CAAC,WAAW,CAAC,cAAc,kBAAkB,CAAC,aAAa,CAAC,YAAY,EAC7I,IAAI,EACJ,EAAE,aAAa,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE,EAAE,CAC3C,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { AgentInvocationInput, AgentInvocationOutput } from '@lua/shared-types';
|
|
2
|
-
import { HttpClient } from './http.client.js';
|
|
3
|
-
import { ApiResponse } from '../interfaces/common.js';
|
|
4
|
-
/**
|
|
5
|
-
* Thin wrapper around `POST /chat/generate/:agentId` used by the lua-cli
|
|
6
|
-
* sandbox's `Agents.invoke`. Mirrors the HTTP pattern `lua chat` already uses
|
|
7
|
-
* — no new endpoint on lua-api / lua-core is required.
|
|
8
|
-
*/
|
|
9
|
-
export default class AgentsApiService extends HttpClient {
|
|
10
|
-
private readonly apiKey;
|
|
11
|
-
constructor(baseUrl: string, apiKey: string);
|
|
12
|
-
invoke(targetAgentId: string, body: AgentInvocationInput): Promise<ApiResponse<AgentInvocationOutput>>;
|
|
13
|
-
/**
|
|
14
|
-
* Sandbox overload: mirrors the `AI.generate` pattern where the simplified
|
|
15
|
-
* `(prompt)` call returns plain text and the `(input)` call returns the
|
|
16
|
-
* full structured output.
|
|
17
|
-
*/
|
|
18
|
-
invokeForSandbox(targetAgentId: string, promptOrInput: string | AgentInvocationInput): Promise<string | AgentInvocationOutput>;
|
|
19
|
-
private toChatGenerateBody;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=agents.api.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agents.api.service.d.ts","sourceRoot":"","sources":["../../src/api/agents.api.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AActD;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU;IAGpD,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADvB,OAAO,EAAE,MAAM,EACE,MAAM,EAAE,MAAM;IAK3B,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;IAU5G;;;;OAIG;IACG,gBAAgB,CACpB,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,GAAG,oBAAoB,GAC3C,OAAO,CAAC,MAAM,GAAG,qBAAqB,CAAC;IAc1C,OAAO,CAAC,kBAAkB;CAa3B"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from './http.client.js';
|
|
2
|
-
/**
|
|
3
|
-
* Thin wrapper around `POST /chat/generate/:agentId` used by the lua-cli
|
|
4
|
-
* sandbox's `Agents.invoke`. Mirrors the HTTP pattern `lua chat` already uses
|
|
5
|
-
* — no new endpoint on lua-api / lua-core is required.
|
|
6
|
-
*/
|
|
7
|
-
export default class AgentsApiService extends HttpClient {
|
|
8
|
-
constructor(baseUrl, apiKey) {
|
|
9
|
-
super(baseUrl);
|
|
10
|
-
this.apiKey = apiKey;
|
|
11
|
-
}
|
|
12
|
-
async invoke(targetAgentId, body) {
|
|
13
|
-
const channel = body.channel ?? 'agent-invocation';
|
|
14
|
-
const query = new URLSearchParams({ channel });
|
|
15
|
-
if (body.identifier)
|
|
16
|
-
query.set('identifier', body.identifier);
|
|
17
|
-
const chatBody = this.toChatGenerateBody(body);
|
|
18
|
-
return this.httpPost(`/chat/generate/${targetAgentId}?${query.toString()}`, chatBody, {
|
|
19
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Sandbox overload: mirrors the `AI.generate` pattern where the simplified
|
|
24
|
-
* `(prompt)` call returns plain text and the `(input)` call returns the
|
|
25
|
-
* full structured output.
|
|
26
|
-
*/
|
|
27
|
-
async invokeForSandbox(targetAgentId, promptOrInput) {
|
|
28
|
-
const input = typeof promptOrInput === 'string' ? { prompt: promptOrInput } : promptOrInput;
|
|
29
|
-
const result = await this.invoke(targetAgentId, input);
|
|
30
|
-
if (!result.success) {
|
|
31
|
-
throw new Error(result.error?.message || 'Agent invocation failed');
|
|
32
|
-
}
|
|
33
|
-
if (!result.data) {
|
|
34
|
-
throw new Error('Agent invocation failed: empty response');
|
|
35
|
-
}
|
|
36
|
-
return typeof promptOrInput === 'string' ? (result.data.text ?? '') : result.data;
|
|
37
|
-
}
|
|
38
|
-
toChatGenerateBody(body) {
|
|
39
|
-
const messages = body.messages
|
|
40
|
-
? body.messages
|
|
41
|
-
: [{ type: 'text', text: body.prompt ?? '' }];
|
|
42
|
-
return {
|
|
43
|
-
messages,
|
|
44
|
-
navigate: false,
|
|
45
|
-
...(body.systemPrompt !== undefined ? { systemPrompt: body.systemPrompt } : {}),
|
|
46
|
-
...(body.runtimeContext !== undefined ? { runtimeContext: body.runtimeContext } : {}),
|
|
47
|
-
...(body.threadId !== undefined ? { threadId: body.threadId } : {}),
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=agents.api.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agents.api.service.js","sourceRoot":"","sources":["../../src/api/agents.api.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAe9C;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU;IACtD,YACE,OAAe,EACE,MAAc;QAE/B,KAAK,CAAC,OAAO,CAAC,CAAC;QAFE,WAAM,GAAN,MAAM,CAAQ;IAGjC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,aAAqB,EAAE,IAA0B;QAC5D,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,kBAAkB,CAAC;QACnD,MAAM,KAAK,GAAG,IAAI,eAAe,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QAC/C,IAAI,IAAI,CAAC,UAAU;YAAE,KAAK,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC,QAAQ,CAAwB,kBAAkB,aAAa,IAAI,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE;YAC3G,aAAa,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE;SACvC,CAAC,CAAC;IACL,CAAC;IAED;;;;OAI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,CAAC;YACrF,GAAG,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACpE,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { aiGenerateInputFromSimplified, type AiGenerateInput, type AiGenerateOutput } from '@lua/shared-types';
|
|
2
|
-
import type { UserContent } from 'ai';
|
|
3
|
-
import { HttpClient } from './http.client.js';
|
|
4
|
-
import { ApiResponse } from '../interfaces/common.js';
|
|
5
|
-
export declare const aiGenerateSimplifiedToBody: typeof aiGenerateInputFromSimplified;
|
|
6
|
-
/**
|
|
7
|
-
* Proxies isolated AI generation to lua-api (server-side Gemini + usage).
|
|
8
|
-
*/
|
|
9
|
-
export default class AiApiService extends HttpClient {
|
|
10
|
-
private readonly apiKey;
|
|
11
|
-
private readonly agentId;
|
|
12
|
-
constructor(baseUrl: string, apiKey: string, agentId: string);
|
|
13
|
-
generate(body: AiGenerateInput): Promise<ApiResponse<AiGenerateOutput>>;
|
|
14
|
-
/**
|
|
15
|
-
* Handles the simplified-vs-full-options branching for `AI.generate`.
|
|
16
|
-
* Returns plain text for the simplified overload, full output for the options overload.
|
|
17
|
-
*/
|
|
18
|
-
generateForSandbox(promptOrOptions: string | AiGenerateInput, content?: UserContent): Promise<string | AiGenerateOutput>;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=ai.api.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai.api.service.d.ts","sourceRoot":"","sources":["../../src/api/ai.api.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC/G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,eAAO,MAAM,0BAA0B,sCAAgC,CAAC;AAExE;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,UAAU;IAGhD,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAFxB,OAAO,EAAE,MAAM,EACE,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM;IAK5B,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAM7E;;;OAGG;IACG,kBAAkB,CACtB,eAAe,EAAE,MAAM,GAAG,eAAe,EACzC,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,MAAM,GAAG,gBAAgB,CAAC;CAiBtC"}
|