lua-cli 3.15.3 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-exports.d.ts +5029 -698
- package/dist/api-exports.js +6509 -772
- package/dist/api-exports.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +41174 -82
- package/dist/index.js.map +1 -1
- package/dist/voice/test/index.d.ts +1217 -0
- package/dist/voice/test/index.js +386 -0
- package/dist/voice/test/index.js.map +1 -0
- package/dist/voice-exports.d.ts +40 -0
- package/dist/voice-exports.js +16 -0
- package/dist/voice-exports.js.map +1 -0
- package/docs/README.md +1 -1
- package/package.json +38 -21
- package/scripts/build-vendor.mjs +6 -3
- package/scripts/run-api-extractor.mjs +79 -0
- package/template/.gitignore +21 -0
- package/template/package.json +1 -1
- package/dist/api/agent.api.service.d.ts +0 -165
- package/dist/api/agent.api.service.d.ts.map +0 -1
- package/dist/api/agent.api.service.js +0 -207
- package/dist/api/agent.api.service.js.map +0 -1
- package/dist/api/agents.api.service.d.ts +0 -21
- package/dist/api/agents.api.service.d.ts.map +0 -1
- package/dist/api/agents.api.service.js +0 -51
- package/dist/api/agents.api.service.js.map +0 -1
- package/dist/api/ai.api.service.d.ts +0 -20
- package/dist/api/ai.api.service.d.ts.map +0 -1
- package/dist/api/ai.api.service.js +0 -40
- package/dist/api/ai.api.service.js.map +0 -1
- package/dist/api/auth.api.service.d.ts +0 -49
- package/dist/api/auth.api.service.d.ts.map +0 -1
- package/dist/api/auth.api.service.js +0 -55
- package/dist/api/auth.api.service.js.map +0 -1
- package/dist/api/backup.api.service.d.ts +0 -78
- package/dist/api/backup.api.service.d.ts.map +0 -1
- package/dist/api/backup.api.service.js +0 -115
- package/dist/api/backup.api.service.js.map +0 -1
- package/dist/api/basket.api.service.d.ts +0 -85
- package/dist/api/basket.api.service.d.ts.map +0 -1
- package/dist/api/basket.api.service.js +0 -160
- package/dist/api/basket.api.service.js.map +0 -1
- package/dist/api/cdn.api.service.d.ts +0 -21
- package/dist/api/cdn.api.service.d.ts.map +0 -1
- package/dist/api/cdn.api.service.js +0 -46
- package/dist/api/cdn.api.service.js.map +0 -1
- package/dist/api/chat.api.service.d.ts +0 -40
- package/dist/api/chat.api.service.d.ts.map +0 -1
- package/dist/api/chat.api.service.js +0 -121
- package/dist/api/chat.api.service.js.map +0 -1
- package/dist/api/credentials.d.ts +0 -25
- package/dist/api/credentials.d.ts.map +0 -1
- package/dist/api/credentials.js +0 -44
- package/dist/api/credentials.js.map +0 -1
- package/dist/api/custom.data.api.service.d.ts +0 -71
- package/dist/api/custom.data.api.service.d.ts.map +0 -1
- package/dist/api/custom.data.api.service.js +0 -126
- package/dist/api/custom.data.api.service.js.map +0 -1
- package/dist/api/developer.api.service.d.ts +0 -121
- package/dist/api/developer.api.service.d.ts.map +0 -1
- package/dist/api/developer.api.service.js +0 -162
- package/dist/api/developer.api.service.js.map +0 -1
- package/dist/api/device-trigger.api.service.d.ts +0 -136
- package/dist/api/device-trigger.api.service.d.ts.map +0 -1
- package/dist/api/device-trigger.api.service.js +0 -120
- package/dist/api/device-trigger.api.service.js.map +0 -1
- package/dist/api/device.api.service.d.ts +0 -61
- package/dist/api/device.api.service.d.ts.map +0 -1
- package/dist/api/device.api.service.js +0 -72
- package/dist/api/device.api.service.js.map +0 -1
- package/dist/api/http.client.d.ts +0 -90
- package/dist/api/http.client.d.ts.map +0 -1
- package/dist/api/http.client.js +0 -265
- package/dist/api/http.client.js.map +0 -1
- package/dist/api/job.api.service.d.ts +0 -154
- package/dist/api/job.api.service.d.ts.map +0 -1
- package/dist/api/job.api.service.js +0 -230
- package/dist/api/job.api.service.js.map +0 -1
- package/dist/api/lazy-instances.d.ts +0 -107
- package/dist/api/lazy-instances.d.ts.map +0 -1
- package/dist/api/lazy-instances.js +0 -220
- package/dist/api/lazy-instances.js.map +0 -1
- package/dist/api/logs.api.service.d.ts +0 -38
- package/dist/api/logs.api.service.d.ts.map +0 -1
- package/dist/api/logs.api.service.js +0 -50
- package/dist/api/logs.api.service.js.map +0 -1
- package/dist/api/marketplace.api.service.d.ts +0 -28
- package/dist/api/marketplace.api.service.d.ts.map +0 -1
- package/dist/api/marketplace.api.service.js +0 -112
- package/dist/api/marketplace.api.service.js.map +0 -1
- package/dist/api/order.api.service.d.ts +0 -53
- package/dist/api/order.api.service.d.ts.map +0 -1
- package/dist/api/order.api.service.js +0 -94
- package/dist/api/order.api.service.js.map +0 -1
- package/dist/api/persona.api.service.d.ts +0 -56
- package/dist/api/persona.api.service.d.ts.map +0 -1
- package/dist/api/persona.api.service.js +0 -90
- package/dist/api/persona.api.service.js.map +0 -1
- package/dist/api/postprocessor.api.service.d.ts +0 -151
- package/dist/api/postprocessor.api.service.d.ts.map +0 -1
- package/dist/api/postprocessor.api.service.js +0 -109
- package/dist/api/postprocessor.api.service.js.map +0 -1
- package/dist/api/preprocessor.api.service.d.ts +0 -155
- package/dist/api/preprocessor.api.service.d.ts.map +0 -1
- package/dist/api/preprocessor.api.service.js +0 -111
- package/dist/api/preprocessor.api.service.js.map +0 -1
- package/dist/api/products.api.service.d.ts +0 -80
- package/dist/api/products.api.service.d.ts.map +0 -1
- package/dist/api/products.api.service.js +0 -126
- package/dist/api/products.api.service.js.map +0 -1
- package/dist/api/resource.api.service.d.ts +0 -77
- package/dist/api/resource.api.service.d.ts.map +0 -1
- package/dist/api/resource.api.service.js +0 -74
- package/dist/api/resource.api.service.js.map +0 -1
- package/dist/api/skills.api.service.d.ts +0 -94
- package/dist/api/skills.api.service.d.ts.map +0 -1
- package/dist/api/skills.api.service.js +0 -120
- package/dist/api/skills.api.service.js.map +0 -1
- package/dist/api/tool.api.service.d.ts +0 -53
- package/dist/api/tool.api.service.d.ts.map +0 -1
- package/dist/api/tool.api.service.js +0 -74
- package/dist/api/tool.api.service.js.map +0 -1
- package/dist/api/unifiedto.api.service.d.ts +0 -133
- package/dist/api/unifiedto.api.service.d.ts.map +0 -1
- package/dist/api/unifiedto.api.service.js +0 -166
- package/dist/api/unifiedto.api.service.js.map +0 -1
- package/dist/api/user.data.api.service.d.ts +0 -69
- package/dist/api/user.data.api.service.d.ts.map +0 -1
- package/dist/api/user.data.api.service.js +0 -158
- package/dist/api/user.data.api.service.js.map +0 -1
- package/dist/api/webhook.api.service.d.ts +0 -163
- package/dist/api/webhook.api.service.d.ts.map +0 -1
- package/dist/api/webhook.api.service.js +0 -140
- package/dist/api/webhook.api.service.js.map +0 -1
- package/dist/api/whatsapp-templates.api.service.d.ts +0 -41
- package/dist/api/whatsapp-templates.api.service.d.ts.map +0 -1
- package/dist/api/whatsapp-templates.api.service.js +0 -79
- package/dist/api/whatsapp-templates.api.service.js.map +0 -1
- package/dist/api-exports.d.ts.map +0 -1
- package/dist/cli/command-definitions.d.ts +0 -29
- package/dist/cli/command-definitions.d.ts.map +0 -1
- package/dist/cli/command-definitions.js +0 -943
- package/dist/cli/command-definitions.js.map +0 -1
- package/dist/commands/admin.d.ts +0 -24
- package/dist/commands/admin.d.ts.map +0 -1
- package/dist/commands/admin.js +0 -44
- package/dist/commands/admin.js.map +0 -1
- package/dist/commands/agents.d.ts +0 -23
- package/dist/commands/agents.d.ts.map +0 -1
- package/dist/commands/agents.js +0 -83
- package/dist/commands/agents.js.map +0 -1
- package/dist/commands/apiKey.d.ts +0 -8
- package/dist/commands/apiKey.d.ts.map +0 -1
- package/dist/commands/apiKey.js +0 -43
- package/dist/commands/apiKey.js.map +0 -1
- package/dist/commands/channels.d.ts +0 -13
- package/dist/commands/channels.d.ts.map +0 -1
- package/dist/commands/channels.js +0 -747
- package/dist/commands/channels.js.map +0 -1
- package/dist/commands/chat-log-probe.d.ts +0 -59
- package/dist/commands/chat-log-probe.d.ts.map +0 -1
- package/dist/commands/chat-log-probe.js +0 -87
- package/dist/commands/chat-log-probe.js.map +0 -1
- package/dist/commands/chat.d.ts +0 -20
- package/dist/commands/chat.d.ts.map +0 -1
- package/dist/commands/chat.js +0 -618
- package/dist/commands/chat.js.map +0 -1
- package/dist/commands/chatClear.d.ts +0 -25
- package/dist/commands/chatClear.d.ts.map +0 -1
- package/dist/commands/chatClear.js +0 -71
- package/dist/commands/chatClear.js.map +0 -1
- package/dist/commands/compile.d.ts +0 -48
- package/dist/commands/compile.d.ts.map +0 -1
- package/dist/commands/compile.js +0 -216
- package/dist/commands/compile.js.map +0 -1
- package/dist/commands/completion.d.ts +0 -12
- package/dist/commands/completion.d.ts.map +0 -1
- package/dist/commands/completion.js +0 -211
- package/dist/commands/completion.js.map +0 -1
- package/dist/commands/configure.d.ts +0 -42
- package/dist/commands/configure.d.ts.map +0 -1
- package/dist/commands/configure.js +0 -76
- package/dist/commands/configure.js.map +0 -1
- package/dist/commands/deploy.d.ts +0 -14
- package/dist/commands/deploy.d.ts.map +0 -1
- package/dist/commands/deploy.js +0 -517
- package/dist/commands/deploy.js.map +0 -1
- package/dist/commands/destroy.d.ts +0 -8
- package/dist/commands/destroy.d.ts.map +0 -1
- package/dist/commands/destroy.js +0 -66
- package/dist/commands/destroy.js.map +0 -1
- package/dist/commands/devices.d.ts +0 -6
- package/dist/commands/devices.d.ts.map +0 -1
- package/dist/commands/devices.js +0 -265
- package/dist/commands/devices.js.map +0 -1
- package/dist/commands/docs.d.ts +0 -20
- package/dist/commands/docs.d.ts.map +0 -1
- package/dist/commands/docs.js +0 -33
- package/dist/commands/docs.js.map +0 -1
- package/dist/commands/env.d.ts +0 -34
- package/dist/commands/env.d.ts.map +0 -1
- package/dist/commands/env.js +0 -612
- package/dist/commands/env.js.map +0 -1
- package/dist/commands/evals.d.ts +0 -9
- package/dist/commands/evals.d.ts.map +0 -1
- package/dist/commands/evals.js +0 -27
- package/dist/commands/evals.js.map +0 -1
- package/dist/commands/features.d.ts +0 -13
- package/dist/commands/features.d.ts.map +0 -1
- package/dist/commands/features.js +0 -455
- package/dist/commands/features.js.map +0 -1
- package/dist/commands/governance.d.ts +0 -7
- package/dist/commands/governance.d.ts.map +0 -1
- package/dist/commands/governance.js +0 -258
- package/dist/commands/governance.js.map +0 -1
- package/dist/commands/index.d.ts +0 -38
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js +0 -38
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/init.d.ts +0 -53
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -992
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/integrations.d.ts +0 -18
- package/dist/commands/integrations.d.ts.map +0 -1
- package/dist/commands/integrations.js +0 -2666
- package/dist/commands/integrations.js.map +0 -1
- package/dist/commands/jobs.d.ts +0 -13
- package/dist/commands/jobs.d.ts.map +0 -1
- package/dist/commands/jobs.js +0 -736
- package/dist/commands/jobs.js.map +0 -1
- package/dist/commands/log-tip.d.ts +0 -79
- package/dist/commands/log-tip.d.ts.map +0 -1
- package/dist/commands/log-tip.js +0 -83
- package/dist/commands/log-tip.js.map +0 -1
- package/dist/commands/logs.d.ts +0 -13
- package/dist/commands/logs.d.ts.map +0 -1
- package/dist/commands/logs.js +0 -493
- package/dist/commands/logs.js.map +0 -1
- package/dist/commands/marketplace.d.ts +0 -34
- package/dist/commands/marketplace.d.ts.map +0 -1
- package/dist/commands/marketplace.js +0 -2105
- package/dist/commands/marketplace.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -32
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -395
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/models.d.ts +0 -18
- package/dist/commands/models.d.ts.map +0 -1
- package/dist/commands/models.js +0 -207
- package/dist/commands/models.js.map +0 -1
- package/dist/commands/persona.d.ts +0 -13
- package/dist/commands/persona.d.ts.map +0 -1
- package/dist/commands/persona.js +0 -560
- package/dist/commands/persona.js.map +0 -1
- package/dist/commands/postprocessors.d.ts +0 -13
- package/dist/commands/postprocessors.d.ts.map +0 -1
- package/dist/commands/postprocessors.js +0 -558
- package/dist/commands/postprocessors.js.map +0 -1
- package/dist/commands/preprocessors.d.ts +0 -13
- package/dist/commands/preprocessors.d.ts.map +0 -1
- package/dist/commands/preprocessors.js +0 -558
- package/dist/commands/preprocessors.js.map +0 -1
- package/dist/commands/production.d.ts +0 -13
- package/dist/commands/production.d.ts.map +0 -1
- package/dist/commands/production.js +0 -588
- package/dist/commands/production.js.map +0 -1
- package/dist/commands/push-helpers.d.ts +0 -42
- package/dist/commands/push-helpers.d.ts.map +0 -1
- package/dist/commands/push-helpers.js +0 -48
- package/dist/commands/push-helpers.js.map +0 -1
- package/dist/commands/push.d.ts +0 -31
- package/dist/commands/push.d.ts.map +0 -1
- package/dist/commands/push.js +0 -1262
- package/dist/commands/push.js.map +0 -1
- package/dist/commands/pushBackup.d.ts +0 -78
- package/dist/commands/pushBackup.d.ts.map +0 -1
- package/dist/commands/pushBackup.js +0 -274
- package/dist/commands/pushBackup.js.map +0 -1
- package/dist/commands/resources.d.ts +0 -13
- package/dist/commands/resources.d.ts.map +0 -1
- package/dist/commands/resources.js +0 -377
- package/dist/commands/resources.js.map +0 -1
- package/dist/commands/skills.d.ts +0 -13
- package/dist/commands/skills.d.ts.map +0 -1
- package/dist/commands/skills.js +0 -618
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/source.d.ts +0 -72
- package/dist/commands/source.d.ts.map +0 -1
- package/dist/commands/source.js +0 -134
- package/dist/commands/source.js.map +0 -1
- package/dist/commands/status.d.ts +0 -14
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -731
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/sync.d.ts +0 -28
- package/dist/commands/sync.d.ts.map +0 -1
- package/dist/commands/sync.js +0 -802
- package/dist/commands/sync.js.map +0 -1
- package/dist/commands/telemetry.d.ts +0 -6
- package/dist/commands/telemetry.d.ts.map +0 -1
- package/dist/commands/telemetry.js +0 -42
- package/dist/commands/telemetry.js.map +0 -1
- package/dist/commands/test-output.helpers.d.ts +0 -24
- package/dist/commands/test-output.helpers.d.ts.map +0 -1
- package/dist/commands/test-output.helpers.js +0 -62
- package/dist/commands/test-output.helpers.js.map +0 -1
- package/dist/commands/test.d.ts +0 -9
- package/dist/commands/test.d.ts.map +0 -1
- package/dist/commands/test.js +0 -787
- package/dist/commands/test.js.map +0 -1
- package/dist/commands/update.d.ts +0 -14
- package/dist/commands/update.d.ts.map +0 -1
- package/dist/commands/update.js +0 -97
- package/dist/commands/update.js.map +0 -1
- package/dist/commands/webhooks.d.ts +0 -13
- package/dist/commands/webhooks.d.ts.map +0 -1
- package/dist/commands/webhooks.js +0 -691
- package/dist/commands/webhooks.js.map +0 -1
- package/dist/compiler/agent-traverser.d.ts +0 -140
- package/dist/compiler/agent-traverser.d.ts.map +0 -1
- package/dist/compiler/agent-traverser.js +0 -420
- package/dist/compiler/agent-traverser.js.map +0 -1
- package/dist/compiler/bundler.d.ts +0 -43
- package/dist/compiler/bundler.d.ts.map +0 -1
- package/dist/compiler/bundler.js +0 -188
- package/dist/compiler/bundler.js.map +0 -1
- package/dist/compiler/compiler.d.ts +0 -208
- package/dist/compiler/compiler.d.ts.map +0 -1
- package/dist/compiler/compiler.js +0 -706
- package/dist/compiler/compiler.js.map +0 -1
- package/dist/compiler/index.d.ts +0 -38
- package/dist/compiler/index.d.ts.map +0 -1
- package/dist/compiler/index.js +0 -43
- package/dist/compiler/index.js.map +0 -1
- package/dist/compiler/plugins/agent.plugin.d.ts +0 -58
- package/dist/compiler/plugins/agent.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/agent.plugin.js +0 -161
- package/dist/compiler/plugins/agent.plugin.js.map +0 -1
- package/dist/compiler/plugins/base.d.ts +0 -334
- package/dist/compiler/plugins/base.d.ts.map +0 -1
- package/dist/compiler/plugins/base.js +0 -353
- package/dist/compiler/plugins/base.js.map +0 -1
- package/dist/compiler/plugins/device-trigger.plugin.d.ts +0 -38
- package/dist/compiler/plugins/device-trigger.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/device-trigger.plugin.js +0 -107
- package/dist/compiler/plugins/device-trigger.plugin.js.map +0 -1
- package/dist/compiler/plugins/device.plugin.d.ts +0 -39
- package/dist/compiler/plugins/device.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/device.plugin.js +0 -77
- package/dist/compiler/plugins/device.plugin.js.map +0 -1
- package/dist/compiler/plugins/job.plugin.d.ts +0 -34
- package/dist/compiler/plugins/job.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/job.plugin.js +0 -108
- package/dist/compiler/plugins/job.plugin.js.map +0 -1
- package/dist/compiler/plugins/mcp-server.plugin.d.ts +0 -38
- package/dist/compiler/plugins/mcp-server.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/mcp-server.plugin.js +0 -107
- package/dist/compiler/plugins/mcp-server.plugin.js.map +0 -1
- package/dist/compiler/plugins/postprocessor.plugin.d.ts +0 -21
- package/dist/compiler/plugins/postprocessor.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/postprocessor.plugin.js +0 -36
- package/dist/compiler/plugins/postprocessor.plugin.js.map +0 -1
- package/dist/compiler/plugins/preprocessor.plugin.d.ts +0 -21
- package/dist/compiler/plugins/preprocessor.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/preprocessor.plugin.js +0 -38
- package/dist/compiler/plugins/preprocessor.plugin.js.map +0 -1
- package/dist/compiler/plugins/processor-base.d.ts +0 -17
- package/dist/compiler/plugins/processor-base.d.ts.map +0 -1
- package/dist/compiler/plugins/processor-base.js +0 -27
- package/dist/compiler/plugins/processor-base.js.map +0 -1
- package/dist/compiler/plugins/registry.d.ts +0 -62
- package/dist/compiler/plugins/registry.d.ts.map +0 -1
- package/dist/compiler/plugins/registry.js +0 -113
- package/dist/compiler/plugins/registry.js.map +0 -1
- package/dist/compiler/plugins/skill.plugin.d.ts +0 -106
- package/dist/compiler/plugins/skill.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/skill.plugin.js +0 -316
- package/dist/compiler/plugins/skill.plugin.js.map +0 -1
- package/dist/compiler/plugins/tool.plugin.d.ts +0 -69
- package/dist/compiler/plugins/tool.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/tool.plugin.js +0 -262
- package/dist/compiler/plugins/tool.plugin.js.map +0 -1
- package/dist/compiler/plugins/webhook.plugin.d.ts +0 -38
- package/dist/compiler/plugins/webhook.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/webhook.plugin.js +0 -117
- package/dist/compiler/plugins/webhook.plugin.js.map +0 -1
- package/dist/compiler/source-writer.d.ts +0 -129
- package/dist/compiler/source-writer.d.ts.map +0 -1
- package/dist/compiler/source-writer.js +0 -329
- package/dist/compiler/source-writer.js.map +0 -1
- package/dist/compiler/types.d.ts +0 -391
- package/dist/compiler/types.d.ts.map +0 -1
- package/dist/compiler/types.js +0 -30
- package/dist/compiler/types.js.map +0 -1
- package/dist/compiler/utils/ast-helpers.d.ts +0 -106
- package/dist/compiler/utils/ast-helpers.d.ts.map +0 -1
- package/dist/compiler/utils/ast-helpers.js +0 -356
- package/dist/compiler/utils/ast-helpers.js.map +0 -1
- package/dist/compiler/utils/common.d.ts +0 -22
- package/dist/compiler/utils/common.d.ts.map +0 -1
- package/dist/compiler/utils/common.js +0 -55
- package/dist/compiler/utils/common.js.map +0 -1
- package/dist/compiler/utils/file-discovery.d.ts +0 -35
- package/dist/compiler/utils/file-discovery.d.ts.map +0 -1
- package/dist/compiler/utils/file-discovery.js +0 -60
- package/dist/compiler/utils/file-discovery.js.map +0 -1
- package/dist/compiler/utils/path-resolver.d.ts +0 -83
- package/dist/compiler/utils/path-resolver.d.ts.map +0 -1
- package/dist/compiler/utils/path-resolver.js +0 -162
- package/dist/compiler/utils/path-resolver.js.map +0 -1
- package/dist/compiler/utils/reference-resolver.d.ts +0 -196
- package/dist/compiler/utils/reference-resolver.d.ts.map +0 -1
- package/dist/compiler/utils/reference-resolver.js +0 -1026
- package/dist/compiler/utils/reference-resolver.js.map +0 -1
- package/dist/compiler/utils/schema-converter.d.ts +0 -52
- package/dist/compiler/utils/schema-converter.d.ts.map +0 -1
- package/dist/compiler/utils/schema-converter.js +0 -170
- package/dist/compiler/utils/schema-converter.js.map +0 -1
- package/dist/compiler/utils/workspace.d.ts +0 -35
- package/dist/compiler/utils/workspace.d.ts.map +0 -1
- package/dist/compiler/utils/workspace.js +0 -121
- package/dist/compiler/utils/workspace.js.map +0 -1
- package/dist/config/compile.constants.d.ts +0 -75
- package/dist/config/compile.constants.d.ts.map +0 -1
- package/dist/config/compile.constants.js +0 -95
- package/dist/config/compile.constants.js.map +0 -1
- package/dist/config/constants.d.ts +0 -49
- package/dist/config/constants.d.ts.map +0 -1
- package/dist/config/constants.js +0 -69
- package/dist/config/constants.js.map +0 -1
- package/dist/errors/auth.error.d.ts +0 -34
- package/dist/errors/auth.error.d.ts.map +0 -1
- package/dist/errors/auth.error.js +0 -29
- package/dist/errors/auth.error.js.map +0 -1
- package/dist/errors/index.d.ts +0 -5
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/index.js +0 -5
- package/dist/errors/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/instances/basket.instance.d.ts +0 -82
- package/dist/instances/basket.instance.d.ts.map +0 -1
- package/dist/instances/basket.instance.js +0 -245
- package/dist/instances/basket.instance.js.map +0 -1
- package/dist/instances/data.entry.instance.d.ts +0 -50
- package/dist/instances/data.entry.instance.d.ts.map +0 -1
- package/dist/instances/data.entry.instance.js +0 -163
- package/dist/instances/data.entry.instance.js.map +0 -1
- package/dist/instances/job.instance.d.ts +0 -133
- package/dist/instances/job.instance.d.ts.map +0 -1
- package/dist/instances/job.instance.js +0 -180
- package/dist/instances/job.instance.js.map +0 -1
- package/dist/instances/order.instance.d.ts +0 -50
- package/dist/instances/order.instance.d.ts.map +0 -1
- package/dist/instances/order.instance.js +0 -199
- package/dist/instances/order.instance.js.map +0 -1
- package/dist/instances/product.instance.d.ts +0 -43
- package/dist/instances/product.instance.d.ts.map +0 -1
- package/dist/instances/product.instance.js +0 -145
- package/dist/instances/product.instance.js.map +0 -1
- package/dist/instances/product.pagination.instance.d.ts +0 -102
- package/dist/instances/product.pagination.instance.d.ts.map +0 -1
- package/dist/instances/product.pagination.instance.js +0 -156
- package/dist/instances/product.pagination.instance.js.map +0 -1
- package/dist/instances/product.search.instance.d.ts +0 -81
- package/dist/instances/product.search.instance.d.ts.map +0 -1
- package/dist/instances/product.search.instance.js +0 -121
- package/dist/instances/product.search.instance.js.map +0 -1
- package/dist/instances/user.instance.d.ts +0 -56
- package/dist/instances/user.instance.d.ts.map +0 -1
- package/dist/instances/user.instance.js +0 -188
- package/dist/instances/user.instance.js.map +0 -1
- package/dist/interfaces/admin.d.ts +0 -64
- package/dist/interfaces/admin.d.ts.map +0 -1
- package/dist/interfaces/admin.js +0 -6
- package/dist/interfaces/admin.js.map +0 -1
- package/dist/interfaces/agent.d.ts +0 -399
- package/dist/interfaces/agent.d.ts.map +0 -1
- package/dist/interfaces/agent.js +0 -6
- package/dist/interfaces/agent.js.map +0 -1
- package/dist/interfaces/backup.d.ts +0 -17
- package/dist/interfaces/backup.d.ts.map +0 -1
- package/dist/interfaces/backup.js +0 -7
- package/dist/interfaces/backup.js.map +0 -1
- package/dist/interfaces/baskets.d.ts +0 -80
- package/dist/interfaces/baskets.d.ts.map +0 -1
- package/dist/interfaces/baskets.js +0 -20
- package/dist/interfaces/baskets.js.map +0 -1
- package/dist/interfaces/cdn.d.ts +0 -25
- package/dist/interfaces/cdn.d.ts.map +0 -1
- package/dist/interfaces/cdn.js +0 -6
- package/dist/interfaces/cdn.js.map +0 -1
- package/dist/interfaces/chat.d.ts +0 -98
- package/dist/interfaces/chat.d.ts.map +0 -1
- package/dist/interfaces/chat.js +0 -6
- package/dist/interfaces/chat.js.map +0 -1
- package/dist/interfaces/common.d.ts +0 -64
- package/dist/interfaces/common.d.ts.map +0 -1
- package/dist/interfaces/common.js +0 -9
- package/dist/interfaces/common.js.map +0 -1
- package/dist/interfaces/custom.data.d.ts +0 -83
- package/dist/interfaces/custom.data.d.ts.map +0 -1
- package/dist/interfaces/custom.data.js +0 -6
- package/dist/interfaces/custom.data.js.map +0 -1
- package/dist/interfaces/deploy.d.ts +0 -15
- package/dist/interfaces/deploy.d.ts.map +0 -1
- package/dist/interfaces/deploy.js +0 -5
- package/dist/interfaces/deploy.js.map +0 -1
- package/dist/interfaces/dev.d.ts +0 -54
- package/dist/interfaces/dev.d.ts.map +0 -1
- package/dist/interfaces/dev.js +0 -6
- package/dist/interfaces/dev.js.map +0 -1
- package/dist/interfaces/device-triggers.d.ts +0 -80
- package/dist/interfaces/device-triggers.d.ts.map +0 -1
- package/dist/interfaces/device-triggers.js +0 -6
- package/dist/interfaces/device-triggers.js.map +0 -1
- package/dist/interfaces/devices.d.ts +0 -74
- package/dist/interfaces/devices.d.ts.map +0 -1
- package/dist/interfaces/devices.js +0 -5
- package/dist/interfaces/devices.js.map +0 -1
- package/dist/interfaces/index.d.ts +0 -15
- package/dist/interfaces/index.d.ts.map +0 -1
- package/dist/interfaces/index.js +0 -8
- package/dist/interfaces/index.js.map +0 -1
- package/dist/interfaces/init.d.ts +0 -42
- package/dist/interfaces/init.d.ts.map +0 -1
- package/dist/interfaces/init.js +0 -5
- package/dist/interfaces/init.js.map +0 -1
- package/dist/interfaces/jobs.d.ts +0 -149
- package/dist/interfaces/jobs.d.ts.map +0 -1
- package/dist/interfaces/jobs.js +0 -6
- package/dist/interfaces/jobs.js.map +0 -1
- package/dist/interfaces/logs.d.ts +0 -44
- package/dist/interfaces/logs.d.ts.map +0 -1
- package/dist/interfaces/logs.js +0 -6
- package/dist/interfaces/logs.js.map +0 -1
- package/dist/interfaces/lua.d.ts +0 -37
- package/dist/interfaces/lua.d.ts.map +0 -1
- package/dist/interfaces/lua.js +0 -6
- package/dist/interfaces/lua.js.map +0 -1
- package/dist/interfaces/marketplace.d.ts +0 -171
- package/dist/interfaces/marketplace.d.ts.map +0 -1
- package/dist/interfaces/marketplace.js +0 -3
- package/dist/interfaces/marketplace.js.map +0 -1
- package/dist/interfaces/mcp.d.ts +0 -96
- package/dist/interfaces/mcp.d.ts.map +0 -1
- package/dist/interfaces/mcp.js +0 -9
- package/dist/interfaces/mcp.js.map +0 -1
- package/dist/interfaces/message.d.ts +0 -16
- package/dist/interfaces/message.d.ts.map +0 -1
- package/dist/interfaces/message.js +0 -2
- package/dist/interfaces/message.js.map +0 -1
- package/dist/interfaces/orders.d.ts +0 -68
- package/dist/interfaces/orders.d.ts.map +0 -1
- package/dist/interfaces/orders.js +0 -20
- package/dist/interfaces/orders.js.map +0 -1
- package/dist/interfaces/persona.d.ts +0 -44
- package/dist/interfaces/persona.d.ts.map +0 -1
- package/dist/interfaces/persona.js +0 -6
- package/dist/interfaces/persona.js.map +0 -1
- package/dist/interfaces/postprocessors.d.ts +0 -15
- package/dist/interfaces/postprocessors.d.ts.map +0 -1
- package/dist/interfaces/postprocessors.js +0 -5
- package/dist/interfaces/postprocessors.js.map +0 -1
- package/dist/interfaces/preprocessors.d.ts +0 -15
- package/dist/interfaces/preprocessors.d.ts.map +0 -1
- package/dist/interfaces/preprocessors.js +0 -5
- package/dist/interfaces/preprocessors.js.map +0 -1
- package/dist/interfaces/product.d.ts +0 -92
- package/dist/interfaces/product.d.ts.map +0 -1
- package/dist/interfaces/product.js +0 -6
- package/dist/interfaces/product.js.map +0 -1
- package/dist/interfaces/push.d.ts +0 -27
- package/dist/interfaces/push.d.ts.map +0 -1
- package/dist/interfaces/push.js +0 -5
- package/dist/interfaces/push.js.map +0 -1
- package/dist/interfaces/skills.d.ts +0 -137
- package/dist/interfaces/skills.d.ts.map +0 -1
- package/dist/interfaces/skills.js +0 -6
- package/dist/interfaces/skills.js.map +0 -1
- package/dist/interfaces/test.d.ts +0 -37
- package/dist/interfaces/test.d.ts.map +0 -1
- package/dist/interfaces/test.js +0 -5
- package/dist/interfaces/test.js.map +0 -1
- package/dist/interfaces/unifiedto.d.ts +0 -141
- package/dist/interfaces/unifiedto.d.ts.map +0 -1
- package/dist/interfaces/unifiedto.js +0 -6
- package/dist/interfaces/unifiedto.js.map +0 -1
- package/dist/interfaces/user.d.ts +0 -75
- package/dist/interfaces/user.d.ts.map +0 -1
- package/dist/interfaces/user.js +0 -2
- package/dist/interfaces/user.js.map +0 -1
- package/dist/interfaces/webhooks.d.ts +0 -97
- package/dist/interfaces/webhooks.d.ts.map +0 -1
- package/dist/interfaces/webhooks.js +0 -6
- package/dist/interfaces/webhooks.js.map +0 -1
- package/dist/interfaces/whatsapp-templates.d.ts +0 -105
- package/dist/interfaces/whatsapp-templates.d.ts.map +0 -1
- package/dist/interfaces/whatsapp-templates.js +0 -6
- package/dist/interfaces/whatsapp-templates.js.map +0 -1
- package/dist/primitives/agent.handler.d.ts +0 -71
- package/dist/primitives/agent.handler.d.ts.map +0 -1
- package/dist/primitives/agent.handler.js +0 -226
- package/dist/primitives/agent.handler.js.map +0 -1
- package/dist/primitives/base.handler.d.ts +0 -229
- package/dist/primitives/base.handler.d.ts.map +0 -1
- package/dist/primitives/base.handler.js +0 -620
- package/dist/primitives/base.handler.js.map +0 -1
- package/dist/primitives/device-trigger.handler.d.ts +0 -56
- package/dist/primitives/device-trigger.handler.d.ts.map +0 -1
- package/dist/primitives/device-trigger.handler.js +0 -99
- package/dist/primitives/device-trigger.handler.js.map +0 -1
- package/dist/primitives/device.handler.d.ts +0 -57
- package/dist/primitives/device.handler.d.ts.map +0 -1
- package/dist/primitives/device.handler.js +0 -103
- package/dist/primitives/device.handler.js.map +0 -1
- package/dist/primitives/index.d.ts +0 -51
- package/dist/primitives/index.d.ts.map +0 -1
- package/dist/primitives/index.js +0 -75
- package/dist/primitives/index.js.map +0 -1
- package/dist/primitives/job.handler.d.ts +0 -53
- package/dist/primitives/job.handler.d.ts.map +0 -1
- package/dist/primitives/job.handler.js +0 -110
- package/dist/primitives/job.handler.js.map +0 -1
- package/dist/primitives/mcp-server.handler.d.ts +0 -93
- package/dist/primitives/mcp-server.handler.d.ts.map +0 -1
- package/dist/primitives/mcp-server.handler.js +0 -216
- package/dist/primitives/mcp-server.handler.js.map +0 -1
- package/dist/primitives/postprocessor.handler.d.ts +0 -44
- package/dist/primitives/postprocessor.handler.d.ts.map +0 -1
- package/dist/primitives/postprocessor.handler.js +0 -71
- package/dist/primitives/postprocessor.handler.js.map +0 -1
- package/dist/primitives/preprocessor.handler.d.ts +0 -44
- package/dist/primitives/preprocessor.handler.d.ts.map +0 -1
- package/dist/primitives/preprocessor.handler.js +0 -72
- package/dist/primitives/preprocessor.handler.js.map +0 -1
- package/dist/primitives/skill.handler.d.ts +0 -47
- package/dist/primitives/skill.handler.d.ts.map +0 -1
- package/dist/primitives/skill.handler.js +0 -229
- package/dist/primitives/skill.handler.js.map +0 -1
- package/dist/primitives/types.d.ts +0 -91
- package/dist/primitives/types.d.ts.map +0 -1
- package/dist/primitives/types.js +0 -17
- package/dist/primitives/types.js.map +0 -1
- package/dist/primitives/webhook.handler.d.ts +0 -47
- package/dist/primitives/webhook.handler.d.ts.map +0 -1
- package/dist/primitives/webhook.handler.js +0 -87
- package/dist/primitives/webhook.handler.js.map +0 -1
- package/dist/services/analytics.d.ts +0 -57
- package/dist/services/analytics.d.ts.map +0 -1
- package/dist/services/analytics.js +0 -317
- package/dist/services/analytics.js.map +0 -1
- package/dist/services/auth.d.ts +0 -72
- package/dist/services/auth.d.ts.map +0 -1
- package/dist/services/auth.js +0 -173
- package/dist/services/auth.js.map +0 -1
- package/dist/services/sandbox.service.d.ts +0 -105
- package/dist/services/sandbox.service.d.ts.map +0 -1
- package/dist/services/sandbox.service.js +0 -531
- package/dist/services/sandbox.service.js.map +0 -1
- package/dist/types/api-contracts.d.ts +0 -287
- package/dist/types/api-contracts.d.ts.map +0 -1
- package/dist/types/api-contracts.js +0 -2
- package/dist/types/api-contracts.js.map +0 -1
- package/dist/types/index.d.ts +0 -28
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -30
- package/dist/types/index.js.map +0 -1
- package/dist/types/skill.d.ts +0 -1079
- package/dist/types/skill.d.ts.map +0 -1
- package/dist/types/skill.js +0 -688
- package/dist/types/skill.js.map +0 -1
- package/dist/types/tool-validation.d.ts +0 -35
- package/dist/types/tool-validation.d.ts.map +0 -1
- package/dist/types/tool-validation.js +0 -43
- package/dist/types/tool-validation.js.map +0 -1
- package/dist/types/yaml.types.d.ts +0 -91
- package/dist/types/yaml.types.d.ts.map +0 -1
- package/dist/types/yaml.types.js +0 -5
- package/dist/types/yaml.types.js.map +0 -1
- package/dist/utils/aliases.d.ts +0 -7
- package/dist/utils/aliases.d.ts.map +0 -1
- package/dist/utils/aliases.js +0 -492
- package/dist/utils/aliases.js.map +0 -1
- package/dist/utils/artifact-loader.d.ts +0 -152
- package/dist/utils/artifact-loader.d.ts.map +0 -1
- package/dist/utils/artifact-loader.js +0 -284
- package/dist/utils/artifact-loader.js.map +0 -1
- package/dist/utils/auth-flows.d.ts +0 -55
- package/dist/utils/auth-flows.d.ts.map +0 -1
- package/dist/utils/auth-flows.js +0 -246
- package/dist/utils/auth-flows.js.map +0 -1
- package/dist/utils/backup-helpers.d.ts +0 -238
- package/dist/utils/backup-helpers.d.ts.map +0 -1
- package/dist/utils/backup-helpers.js +0 -704
- package/dist/utils/backup-helpers.js.map +0 -1
- package/dist/utils/build-manifest-from-disk.d.ts +0 -8
- package/dist/utils/build-manifest-from-disk.d.ts.map +0 -1
- package/dist/utils/build-manifest-from-disk.js +0 -21
- package/dist/utils/build-manifest-from-disk.js.map +0 -1
- package/dist/utils/bundle-upload.d.ts +0 -42
- package/dist/utils/bundle-upload.d.ts.map +0 -1
- package/dist/utils/bundle-upload.js +0 -90
- package/dist/utils/bundle-upload.js.map +0 -1
- package/dist/utils/chat-attachments.d.ts +0 -15
- package/dist/utils/chat-attachments.d.ts.map +0 -1
- package/dist/utils/chat-attachments.js +0 -116
- package/dist/utils/chat-attachments.js.map +0 -1
- package/dist/utils/cli.d.ts +0 -62
- package/dist/utils/cli.d.ts.map +0 -1
- package/dist/utils/cli.js +0 -198
- package/dist/utils/cli.js.map +0 -1
- package/dist/utils/command-utils.d.ts +0 -46
- package/dist/utils/command-utils.d.ts.map +0 -1
- package/dist/utils/command-utils.js +0 -74
- package/dist/utils/command-utils.js.map +0 -1
- package/dist/utils/deploy-helpers.d.ts +0 -40
- package/dist/utils/deploy-helpers.d.ts.map +0 -1
- package/dist/utils/deploy-helpers.js +0 -76
- package/dist/utils/deploy-helpers.js.map +0 -1
- package/dist/utils/env-loader.utils.d.ts +0 -19
- package/dist/utils/env-loader.utils.d.ts.map +0 -1
- package/dist/utils/env-loader.utils.js +0 -90
- package/dist/utils/env-loader.utils.js.map +0 -1
- package/dist/utils/files.d.ts +0 -65
- package/dist/utils/files.d.ts.map +0 -1
- package/dist/utils/files.js +0 -193
- package/dist/utils/files.js.map +0 -1
- package/dist/utils/hints.d.ts +0 -81
- package/dist/utils/hints.d.ts.map +0 -1
- package/dist/utils/hints.js +0 -81
- package/dist/utils/hints.js.map +0 -1
- package/dist/utils/init-agent.d.ts +0 -86
- package/dist/utils/init-agent.d.ts.map +0 -1
- package/dist/utils/init-agent.js +0 -201
- package/dist/utils/init-agent.js.map +0 -1
- package/dist/utils/init-helpers.d.ts +0 -37
- package/dist/utils/init-helpers.d.ts.map +0 -1
- package/dist/utils/init-helpers.js +0 -78
- package/dist/utils/init-helpers.js.map +0 -1
- package/dist/utils/init-prompts.d.ts +0 -74
- package/dist/utils/init-prompts.d.ts.map +0 -1
- package/dist/utils/init-prompts.js +0 -256
- package/dist/utils/init-prompts.js.map +0 -1
- package/dist/utils/prompt-handler.d.ts +0 -17
- package/dist/utils/prompt-handler.d.ts.map +0 -1
- package/dist/utils/prompt-handler.js +0 -49
- package/dist/utils/prompt-handler.js.map +0 -1
- package/dist/utils/sandbox-storage.d.ts +0 -83
- package/dist/utils/sandbox-storage.d.ts.map +0 -1
- package/dist/utils/sandbox-storage.js +0 -211
- package/dist/utils/sandbox-storage.js.map +0 -1
- package/dist/utils/sandbox.d.ts +0 -76
- package/dist/utils/sandbox.d.ts.map +0 -1
- package/dist/utils/sandbox.js +0 -664
- package/dist/utils/sandbox.js.map +0 -1
- package/dist/utils/semver.d.ts +0 -40
- package/dist/utils/semver.d.ts.map +0 -1
- package/dist/utils/semver.js +0 -99
- package/dist/utils/semver.js.map +0 -1
- package/dist/utils/suggest.d.ts +0 -3
- package/dist/utils/suggest.d.ts.map +0 -1
- package/dist/utils/suggest.js +0 -32
- package/dist/utils/suggest.js.map +0 -1
- package/dist/utils/sync-display.d.ts +0 -28
- package/dist/utils/sync-display.d.ts.map +0 -1
- package/dist/utils/sync-display.js +0 -168
- package/dist/utils/sync-display.js.map +0 -1
- package/dist/utils/sync-fetch.d.ts +0 -108
- package/dist/utils/sync-fetch.d.ts.map +0 -1
- package/dist/utils/sync-fetch.js +0 -294
- package/dist/utils/sync-fetch.js.map +0 -1
- package/dist/utils/sync-helpers.d.ts +0 -7
- package/dist/utils/sync-helpers.d.ts.map +0 -1
- package/dist/utils/sync-helpers.js +0 -7
- package/dist/utils/sync-helpers.js.map +0 -1
- package/dist/utils/version-check.d.ts +0 -37
- package/dist/utils/version-check.d.ts.map +0 -1
- package/dist/utils/version-check.js +0 -117
- package/dist/utils/version-check.js.map +0 -1
- package/dist/utils/write-info.d.ts +0 -9
- package/dist/utils/write-info.d.ts.map +0 -1
- package/dist/utils/write-info.js +0 -11
- package/dist/utils/write-info.js.map +0 -1
- package/node_modules/@lua/shared-source-sync/dist/index.d.mts +0 -424
- package/node_modules/@lua/shared-source-sync/dist/index.d.ts +0 -424
- package/node_modules/@lua/shared-source-sync/dist/index.js +0 -536
- package/node_modules/@lua/shared-source-sync/dist/index.mjs +0 -491
- package/node_modules/@lua/shared-source-sync/package.json +0 -26
- package/node_modules/@lua/shared-source-sync/src/archive.ts +0 -98
- package/node_modules/@lua/shared-source-sync/src/filter.ts +0 -72
- package/node_modules/@lua/shared-source-sync/src/hash.ts +0 -40
- package/node_modules/@lua/shared-source-sync/src/http.ts +0 -132
- package/node_modules/@lua/shared-source-sync/src/index.ts +0 -56
- package/node_modules/@lua/shared-source-sync/src/pull.ts +0 -50
- package/node_modules/@lua/shared-source-sync/src/push.ts +0 -94
- package/node_modules/@lua/shared-source-sync/src/restore.ts +0 -83
- package/node_modules/@lua/shared-source-sync/src/skill-source.ts +0 -55
- package/node_modules/@lua/shared-source-sync/src/transfer.ts +0 -92
- package/node_modules/@lua/shared-source-sync/src/types.ts +0 -88
- package/node_modules/@lua/shared-source-sync/src/walk.ts +0 -91
- package/node_modules/@lua/shared-source-sync/tests/archive.test.ts +0 -108
- package/node_modules/@lua/shared-source-sync/tests/hash.test.ts +0 -40
- package/node_modules/@lua/shared-source-sync/tests/http.test.ts +0 -77
- package/node_modules/@lua/shared-source-sync/tests/push.test.ts +0 -162
- package/node_modules/@lua/shared-source-sync/tests/walk.test.ts +0 -84
- package/node_modules/@lua/shared-source-sync/tsconfig.json +0 -12
- package/node_modules/@lua/shared-source-sync/tsup.config.ts +0 -9
- package/node_modules/@lua/shared-source-sync/vitest.config.ts +0 -8
- package/node_modules/@lua/shared-types/dist/index.d.mts +0 -619
- package/node_modules/@lua/shared-types/dist/index.d.ts +0 -619
- package/node_modules/@lua/shared-types/dist/index.js +0 -435
- package/node_modules/@lua/shared-types/dist/index.mjs +0 -394
- package/node_modules/@lua/shared-types/package.json +0 -26
- package/node_modules/@lua/shared-types/src/agent-config.types.ts +0 -45
- package/node_modules/@lua/shared-types/src/agent-invocation.types.ts +0 -73
- package/node_modules/@lua/shared-types/src/ai-generate.types.ts +0 -74
- package/node_modules/@lua/shared-types/src/ai-generate.utils.ts +0 -16
- package/node_modules/@lua/shared-types/src/channel.type.ts +0 -23
- package/node_modules/@lua/shared-types/src/chat-history.types.ts +0 -112
- package/node_modules/@lua/shared-types/src/chat-stream.types.ts +0 -18
- package/node_modules/@lua/shared-types/src/client-tools.types.ts +0 -47
- package/node_modules/@lua/shared-types/src/device.types.ts +0 -190
- package/node_modules/@lua/shared-types/src/index.ts +0 -15
- package/node_modules/@lua/shared-types/src/model-registry.ts +0 -26
- package/node_modules/@lua/shared-types/src/persona-defaults.ts +0 -59
- package/node_modules/@lua/shared-types/src/persona-text.type.ts +0 -92
- package/node_modules/@lua/shared-types/src/sandbox-contract.ts +0 -63
- package/node_modules/@lua/shared-types/src/unstructured-types.ts +0 -58
- package/node_modules/@lua/shared-types/src/vm-execution-log.types.ts +0 -41
- package/node_modules/@lua/shared-types/tsconfig.json +0 -12
- package/node_modules/@lua/shared-types/tsup.config.ts +0 -9
- package/scripts/resolve-workspace-deps.cjs +0 -61
- /package/dist/{compiler/utils/zod-runtime.mjs → zod-runtime.mjs} +0 -0
package/dist/utils/hints.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Post-action hint primitives (LUA-180).
|
|
3
|
-
*
|
|
4
|
-
* Pure module (no `import.meta.url`, no analytics) so it's directly testable
|
|
5
|
-
* via ts-jest. {@link ./cli.ts} re-exports these for back-compat with
|
|
6
|
-
* existing call sites.
|
|
7
|
-
*
|
|
8
|
-
* The goal: every push/deploy/chat/sync/compile/test surface ends with a
|
|
9
|
-
* one-line hint at the optimal next command — primarily `lua logs --type X`.
|
|
10
|
-
* Users (especially LLM builders running `lua chat -m "test"`) should never
|
|
11
|
-
* have to guess what to run next.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Returns true when post-action hints should be silently suppressed.
|
|
15
|
-
* Honors the `LUA_NO_HINTS` env var (any truthy value disables hints).
|
|
16
|
-
*
|
|
17
|
-
* Used by both {@link writeTip}/{@link writeNextStep} and the
|
|
18
|
-
* `withErrorHandling` `onError` hook so users can opt out of all hint noise
|
|
19
|
-
* with a single env var.
|
|
20
|
-
*/
|
|
21
|
-
export declare function hintsDisabled(): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Render a free-form tip line. Format: `✨ Tip: <message>`.
|
|
24
|
-
*
|
|
25
|
-
* Honors {@link hintsDisabled} (LUA_NO_HINTS=1 silently no-ops). For tips
|
|
26
|
-
* that point at a specific follow-up command, prefer {@link writeNextStep}
|
|
27
|
-
* which renders the command in backticks with a consistent verb.
|
|
28
|
-
*/
|
|
29
|
-
export declare function writeTip(message: string): void;
|
|
30
|
-
/**
|
|
31
|
-
* Options for {@link writeNextStep}.
|
|
32
|
-
*/
|
|
33
|
-
export interface NextStepOptions {
|
|
34
|
-
/**
|
|
35
|
-
* The follow-up command to surface, e.g. `"lua logs --type skill --limit 10"`.
|
|
36
|
-
* Rendered in backticks.
|
|
37
|
-
*/
|
|
38
|
-
command: string;
|
|
39
|
-
/**
|
|
40
|
-
* Optional rationale appended after the command. A trailing period is added
|
|
41
|
-
* automatically if missing, e.g.
|
|
42
|
-
* rationale: "to inspect runtime behavior"
|
|
43
|
-
* → `✨ Tip: run \`<cmd>\` to inspect runtime behavior.`
|
|
44
|
-
*/
|
|
45
|
-
rationale?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Controls icon and label.
|
|
48
|
-
* - `success` (default) → `✨ Tip: run \`<cmd>\` ...`
|
|
49
|
-
* - `error` → `💡 Diagnose: run \`<cmd>\` ...`
|
|
50
|
-
* - `partial` → `⚠️ Diagnose: run \`<cmd>\` ...`
|
|
51
|
-
*/
|
|
52
|
-
when?: 'success' | 'error' | 'partial';
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Render a "what to do next" hint pointing at a specific CLI command.
|
|
56
|
-
* Used after every push/deploy/chat/sync/compile/test action to make
|
|
57
|
-
* the optimal next command obvious to users and AI builders.
|
|
58
|
-
*
|
|
59
|
-
* Honors {@link hintsDisabled} (LUA_NO_HINTS=1 silently no-ops).
|
|
60
|
-
*/
|
|
61
|
-
export declare function writeNextStep(opts: NextStepOptions): void;
|
|
62
|
-
export interface HintBlockLine {
|
|
63
|
-
label: string;
|
|
64
|
-
command: string;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Render a multi-line contextual hint block.
|
|
68
|
-
* Used when the optimal next action involves a sequence of commands or
|
|
69
|
-
* when a single-line hint would be too narrow (e.g., deploy-then-test).
|
|
70
|
-
*
|
|
71
|
-
* Output format:
|
|
72
|
-
* ✨ <headline>
|
|
73
|
-
* <label> <command>
|
|
74
|
-
* <label> <command>
|
|
75
|
-
*/
|
|
76
|
-
export declare function writeHintBlock(opts: {
|
|
77
|
-
headline: string;
|
|
78
|
-
lines: HintBlockLine[];
|
|
79
|
-
when?: 'success' | 'error' | 'partial';
|
|
80
|
-
}): void;
|
|
81
|
-
//# sourceMappingURL=hints.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hints.d.ts","sourceRoot":"","sources":["../../src/utils/hints.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH;;;;;;;GAOG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAGvC;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAG9C;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;CACxC;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,CAQzD;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;CACxC,GAAG,IAAI,CAcP"}
|
package/dist/utils/hints.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Post-action hint primitives (LUA-180).
|
|
3
|
-
*
|
|
4
|
-
* Pure module (no `import.meta.url`, no analytics) so it's directly testable
|
|
5
|
-
* via ts-jest. {@link ./cli.ts} re-exports these for back-compat with
|
|
6
|
-
* existing call sites.
|
|
7
|
-
*
|
|
8
|
-
* The goal: every push/deploy/chat/sync/compile/test surface ends with a
|
|
9
|
-
* one-line hint at the optimal next command — primarily `lua logs --type X`.
|
|
10
|
-
* Users (especially LLM builders running `lua chat -m "test"`) should never
|
|
11
|
-
* have to guess what to run next.
|
|
12
|
-
*/
|
|
13
|
-
import { writeInfo } from './write-info.js';
|
|
14
|
-
/**
|
|
15
|
-
* Returns true when post-action hints should be silently suppressed.
|
|
16
|
-
* Honors the `LUA_NO_HINTS` env var (any truthy value disables hints).
|
|
17
|
-
*
|
|
18
|
-
* Used by both {@link writeTip}/{@link writeNextStep} and the
|
|
19
|
-
* `withErrorHandling` `onError` hook so users can opt out of all hint noise
|
|
20
|
-
* with a single env var.
|
|
21
|
-
*/
|
|
22
|
-
export function hintsDisabled() {
|
|
23
|
-
const v = process.env.LUA_NO_HINTS;
|
|
24
|
-
return v === '1' || v === 'true' || v === 'yes';
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Render a free-form tip line. Format: `✨ Tip: <message>`.
|
|
28
|
-
*
|
|
29
|
-
* Honors {@link hintsDisabled} (LUA_NO_HINTS=1 silently no-ops). For tips
|
|
30
|
-
* that point at a specific follow-up command, prefer {@link writeNextStep}
|
|
31
|
-
* which renders the command in backticks with a consistent verb.
|
|
32
|
-
*/
|
|
33
|
-
export function writeTip(message) {
|
|
34
|
-
if (hintsDisabled())
|
|
35
|
-
return;
|
|
36
|
-
writeInfo(`✨ Tip: ${message}`);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Render a "what to do next" hint pointing at a specific CLI command.
|
|
40
|
-
* Used after every push/deploy/chat/sync/compile/test action to make
|
|
41
|
-
* the optimal next command obvious to users and AI builders.
|
|
42
|
-
*
|
|
43
|
-
* Honors {@link hintsDisabled} (LUA_NO_HINTS=1 silently no-ops).
|
|
44
|
-
*/
|
|
45
|
-
export function writeNextStep(opts) {
|
|
46
|
-
if (hintsDisabled())
|
|
47
|
-
return;
|
|
48
|
-
const when = opts.when ?? 'success';
|
|
49
|
-
const icon = when === 'error' ? '💡' : when === 'partial' ? '⚠️ ' : '✨';
|
|
50
|
-
const label = when === 'success' ? 'Tip' : 'Diagnose';
|
|
51
|
-
const rationale = opts.rationale?.trim();
|
|
52
|
-
const tail = rationale ? ` ${rationale}${/[.!?]$/.test(rationale) ? '' : '.'}` : '';
|
|
53
|
-
writeInfo(`${icon} ${label}: run \`${opts.command}\`${tail}`);
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Render a multi-line contextual hint block.
|
|
57
|
-
* Used when the optimal next action involves a sequence of commands or
|
|
58
|
-
* when a single-line hint would be too narrow (e.g., deploy-then-test).
|
|
59
|
-
*
|
|
60
|
-
* Output format:
|
|
61
|
-
* ✨ <headline>
|
|
62
|
-
* <label> <command>
|
|
63
|
-
* <label> <command>
|
|
64
|
-
*/
|
|
65
|
-
export function writeHintBlock(opts) {
|
|
66
|
-
if (hintsDisabled())
|
|
67
|
-
return;
|
|
68
|
-
const validLines = opts.lines.filter((l) => l.command && l.command.trim().length > 0);
|
|
69
|
-
const when = opts.when ?? 'success';
|
|
70
|
-
const icon = when === 'error' ? '💡' : when === 'partial' ? '⚠️ ' : '✨';
|
|
71
|
-
if (validLines.length === 0) {
|
|
72
|
-
writeInfo(`${icon} ${opts.headline}`);
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
writeInfo(`${icon} ${opts.headline}`);
|
|
76
|
-
const maxLabelLen = Math.max(...validLines.map((l) => l.label.length));
|
|
77
|
-
for (const { label, command } of validLines) {
|
|
78
|
-
writeInfo(` ${label.padEnd(maxLabelLen)} \`${command}\``);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=hints.js.map
|
package/dist/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type selection, creation, and retrieval
|
|
4
|
-
*/
|
|
5
|
-
import type { PersonaText } from '@lua/shared-types';
|
|
6
|
-
import { AgentType, ApprovedModel } from '../interfaces/agent.js';
|
|
7
|
-
import { AgentCreationResult } from '../interfaces/init.js';
|
|
8
|
-
/**
|
|
9
|
-
* Fetches available agent types from the API.
|
|
10
|
-
*
|
|
11
|
-
* @param apiKey - User's API key
|
|
12
|
-
* @returns Array of available agent types
|
|
13
|
-
*/
|
|
14
|
-
export declare function fetchAgentTypes(apiKey: string): Promise<AgentType[]>;
|
|
15
|
-
/**
|
|
16
|
-
* Selects the Base Agent type from available types.
|
|
17
|
-
* Falls back to first available type if Base Agent is not found.
|
|
18
|
-
*
|
|
19
|
-
* @param agentTypes - Array of available agent types
|
|
20
|
-
* @returns Selected agent type
|
|
21
|
-
* @throws Error if no agent types are available
|
|
22
|
-
*/
|
|
23
|
-
export declare function selectBaseAgentType(agentTypes: AgentType[]): AgentType;
|
|
24
|
-
/**
|
|
25
|
-
* Creates a new agent with the provided configuration.
|
|
26
|
-
*
|
|
27
|
-
* @param apiKey - User's API key
|
|
28
|
-
* @param agentType - Selected agent type
|
|
29
|
-
* @param agentName - Name for the agent
|
|
30
|
-
* @param metadata - Agent metadata
|
|
31
|
-
* @param features - Feature configuration
|
|
32
|
-
* @param existingOrgId - Optional existing organization ID to use
|
|
33
|
-
* @param newOrgName - New organization name (required if not using existing org)
|
|
34
|
-
* @returns Agent creation result with agent and org details
|
|
35
|
-
* @throws Error if agent creation fails
|
|
36
|
-
*/
|
|
37
|
-
export declare function createNewAgent(apiKey: string, agentType: AgentType, agentName: string, metadata: Record<string, any>, features: Record<string, boolean>, existingOrgId?: string, newOrgName?: string, promoCode?: string, model?: string): Promise<AgentCreationResult>;
|
|
38
|
-
/**
|
|
39
|
-
* Fetches detailed agent information for an existing agent.
|
|
40
|
-
* Used when selecting an existing agent during init.
|
|
41
|
-
*
|
|
42
|
-
* @param apiKey - User's API key
|
|
43
|
-
* @param agentId - Agent ID to fetch
|
|
44
|
-
* @returns Agent details including persona
|
|
45
|
-
* @throws Error if fetch fails
|
|
46
|
-
*/
|
|
47
|
-
export declare function fetchExistingAgentDetails(apiKey: string, agentId: string): Promise<{
|
|
48
|
-
persona?: PersonaText;
|
|
49
|
-
model?: string;
|
|
50
|
-
}>;
|
|
51
|
-
/**
|
|
52
|
-
* Fetches all approved LLM models from the API.
|
|
53
|
-
* Returns an empty array if the request fails (non-critical — model selection is optional).
|
|
54
|
-
*
|
|
55
|
-
* @param apiKey - User's API key
|
|
56
|
-
* @returns Array of approved models, or empty array on failure
|
|
57
|
-
*/
|
|
58
|
-
export declare function fetchApprovedModels(apiKey: string): Promise<ApprovedModel[]>;
|
|
59
|
-
/**
|
|
60
|
-
* Validates that a model code (e.g. 'openai/gpt-4o') exists in the approved models list.
|
|
61
|
-
* Used for non-interactive --model flag validation.
|
|
62
|
-
*
|
|
63
|
-
* @param models - Pre-fetched array of approved models
|
|
64
|
-
* @param modelCode - Model code to validate
|
|
65
|
-
* @returns The validated model code
|
|
66
|
-
* @throws Error if the model code is not found, listing available models
|
|
67
|
-
*/
|
|
68
|
-
export declare function validateModelCode(models: ApprovedModel[], modelCode: string): string;
|
|
69
|
-
/**
|
|
70
|
-
* Pushes a model selection to the server by updating the agent.
|
|
71
|
-
*
|
|
72
|
-
* @param apiKey - User's API key
|
|
73
|
-
* @param agentId - Agent ID to update
|
|
74
|
-
* @param model - Model code to set (e.g. 'openai/gpt-4o')
|
|
75
|
-
* @throws Error if the API call fails
|
|
76
|
-
*/
|
|
77
|
-
export declare function updateAgentModel(apiKey: string, agentId: string, model: string): Promise<void>;
|
|
78
|
-
/**
|
|
79
|
-
* Clears the model from the agent on the server, reverting to the platform default.
|
|
80
|
-
*
|
|
81
|
-
* @param apiKey - User's API key
|
|
82
|
-
* @param agentId - Agent ID to update
|
|
83
|
-
* @throws Error if the API call fails
|
|
84
|
-
*/
|
|
85
|
-
export declare function clearAgentModel(apiKey: string, agentId: string): Promise<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;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAWpF;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMpG;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMpF"}
|
package/dist/utils/init-agent.js
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Init Agent Management Utilities
|
|
3
|
-
* Handles agent type selection, creation, and retrieval
|
|
4
|
-
*/
|
|
5
|
-
import AgentApi from '../api/agent.api.service.js';
|
|
6
|
-
import { BASE_URLS, PREFERRED_AGENT_TYPES } from '../config/constants.js';
|
|
7
|
-
import { writeProgress } from './cli.js';
|
|
8
|
-
/**
|
|
9
|
-
* Fetches available agent types from the API.
|
|
10
|
-
*
|
|
11
|
-
* @param apiKey - User's API key
|
|
12
|
-
* @returns Array of available agent types
|
|
13
|
-
*/
|
|
14
|
-
export async function fetchAgentTypes(apiKey) {
|
|
15
|
-
writeProgress('🔄 Fetching agent types...');
|
|
16
|
-
const agentApi = new AgentApi(BASE_URLS.API, apiKey);
|
|
17
|
-
const agentTypesResult = await agentApi.getAgentTypes();
|
|
18
|
-
const agentTypes = agentTypesResult.success ? agentTypesResult.data || [] : [];
|
|
19
|
-
writeProgress('✅ Agent types loaded');
|
|
20
|
-
return agentTypes;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Selects the Base Agent type from available types.
|
|
24
|
-
* Falls back to first available type if Base Agent is not found.
|
|
25
|
-
*
|
|
26
|
-
* @param agentTypes - Array of available agent types
|
|
27
|
-
* @returns Selected agent type
|
|
28
|
-
* @throws Error if no agent types are available
|
|
29
|
-
*/
|
|
30
|
-
export function selectBaseAgentType(agentTypes) {
|
|
31
|
-
// Try to find Base Agent by preferred names
|
|
32
|
-
let selectedAgentType = agentTypes.find((type) => PREFERRED_AGENT_TYPES.some((name) => type.name === name || type.name.toLowerCase().includes(name.toLowerCase())));
|
|
33
|
-
// If not found, use the first available type
|
|
34
|
-
if (!selectedAgentType && agentTypes.length > 0) {
|
|
35
|
-
selectedAgentType = agentTypes[0];
|
|
36
|
-
writeProgress(`⚠️ baseAgent not found, using ${selectedAgentType.name} instead`);
|
|
37
|
-
}
|
|
38
|
-
if (!selectedAgentType) {
|
|
39
|
-
throw new Error('No agent types available. Please contact support.');
|
|
40
|
-
}
|
|
41
|
-
writeProgress(`✅ Using agent type: ${selectedAgentType.name}`);
|
|
42
|
-
return selectedAgentType;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Creates a new agent with the provided configuration.
|
|
46
|
-
*
|
|
47
|
-
* @param apiKey - User's API key
|
|
48
|
-
* @param agentType - Selected agent type
|
|
49
|
-
* @param agentName - Name for the agent
|
|
50
|
-
* @param metadata - Agent metadata
|
|
51
|
-
* @param features - Feature configuration
|
|
52
|
-
* @param existingOrgId - Optional existing organization ID to use
|
|
53
|
-
* @param newOrgName - New organization name (required if not using existing org)
|
|
54
|
-
* @returns Agent creation result with agent and org details
|
|
55
|
-
* @throws Error if agent creation fails
|
|
56
|
-
*/
|
|
57
|
-
export async function createNewAgent(apiKey, agentType, agentName, metadata, features, existingOrgId, newOrgName, promoCode, model) {
|
|
58
|
-
writeProgress('🔄 Creating agent...');
|
|
59
|
-
if (!existingOrgId && !newOrgName) {
|
|
60
|
-
throw new Error('Either existingOrgId or newOrgName must be provided');
|
|
61
|
-
}
|
|
62
|
-
const agentData = {
|
|
63
|
-
id: `agent_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
|
|
64
|
-
name: agentName,
|
|
65
|
-
type: agentType.id,
|
|
66
|
-
metadata,
|
|
67
|
-
features,
|
|
68
|
-
channels: [],
|
|
69
|
-
org: existingOrgId ? { id: existingOrgId } : { registeredName: newOrgName },
|
|
70
|
-
...(promoCode ? { promoCode } : {}),
|
|
71
|
-
...(model ? { model } : {}),
|
|
72
|
-
};
|
|
73
|
-
const agentApi = new AgentApi(BASE_URLS.API, apiKey);
|
|
74
|
-
const createAgentResult = await agentApi.createAgent(agentData);
|
|
75
|
-
if (!createAgentResult.success || !createAgentResult.data) {
|
|
76
|
-
throw new Error(createAgentResult.error?.message || 'Failed to create agent');
|
|
77
|
-
}
|
|
78
|
-
writeProgress('✅ Agent created successfully!');
|
|
79
|
-
if (createAgentResult.data?.promoResult?.applied) {
|
|
80
|
-
const pr = createAgentResult.data.promoResult;
|
|
81
|
-
console.log(`✓ Promo code "${pr.code}" applied — ${pr.credits} bonus credits (${pr.totalCredits} total)`);
|
|
82
|
-
}
|
|
83
|
-
// Validate required fields from API response
|
|
84
|
-
const agentId = createAgentResult.data?.agentId;
|
|
85
|
-
const orgId = createAgentResult.data?.org?.id;
|
|
86
|
-
const persona = createAgentResult.data?.persona;
|
|
87
|
-
if (!agentId || !orgId) {
|
|
88
|
-
throw new Error('Failed to create agent: Missing required fields in API response');
|
|
89
|
-
}
|
|
90
|
-
return {
|
|
91
|
-
agent: {
|
|
92
|
-
agentId,
|
|
93
|
-
name: agentName, // Use the name we sent
|
|
94
|
-
},
|
|
95
|
-
org: {
|
|
96
|
-
id: orgId,
|
|
97
|
-
},
|
|
98
|
-
persona: persona,
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Fetches detailed agent information.
|
|
103
|
-
*
|
|
104
|
-
* @param agentApi - Agent API instance
|
|
105
|
-
* @param agentId - Agent ID to fetch
|
|
106
|
-
* @returns Agent details including persona
|
|
107
|
-
* @throws Error if fetch fails
|
|
108
|
-
*/
|
|
109
|
-
async function fetchAgentDetails(agentApi, agentId) {
|
|
110
|
-
writeProgress('🔄 Fetching agent details...');
|
|
111
|
-
const agentDetailsResult = await agentApi.getAgent(agentId);
|
|
112
|
-
if (!agentDetailsResult.success || !agentDetailsResult.data) {
|
|
113
|
-
throw new Error(agentDetailsResult.error?.message || 'Failed to fetch agent details');
|
|
114
|
-
}
|
|
115
|
-
writeProgress('✅ Agent details loaded');
|
|
116
|
-
return {
|
|
117
|
-
persona: agentDetailsResult.data.persona,
|
|
118
|
-
model: agentDetailsResult.data.model,
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Fetches detailed agent information for an existing agent.
|
|
123
|
-
* Used when selecting an existing agent during init.
|
|
124
|
-
*
|
|
125
|
-
* @param apiKey - User's API key
|
|
126
|
-
* @param agentId - Agent ID to fetch
|
|
127
|
-
* @returns Agent details including persona
|
|
128
|
-
* @throws Error if fetch fails
|
|
129
|
-
*/
|
|
130
|
-
export async function fetchExistingAgentDetails(apiKey, agentId) {
|
|
131
|
-
const agentApi = new AgentApi(BASE_URLS.API, apiKey);
|
|
132
|
-
return fetchAgentDetails(agentApi, agentId);
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Fetches all approved LLM models from the API.
|
|
136
|
-
* Returns an empty array if the request fails (non-critical — model selection is optional).
|
|
137
|
-
*
|
|
138
|
-
* @param apiKey - User's API key
|
|
139
|
-
* @returns Array of approved models, or empty array on failure
|
|
140
|
-
*/
|
|
141
|
-
export async function fetchApprovedModels(apiKey) {
|
|
142
|
-
try {
|
|
143
|
-
const agentApi = new AgentApi(BASE_URLS.API, apiKey);
|
|
144
|
-
const result = await agentApi.getApprovedModels();
|
|
145
|
-
return result.success && result.data ? result.data : [];
|
|
146
|
-
}
|
|
147
|
-
catch {
|
|
148
|
-
return [];
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Validates that a model code (e.g. 'openai/gpt-4o') exists in the approved models list.
|
|
153
|
-
* Used for non-interactive --model flag validation.
|
|
154
|
-
*
|
|
155
|
-
* @param models - Pre-fetched array of approved models
|
|
156
|
-
* @param modelCode - Model code to validate
|
|
157
|
-
* @returns The validated model code
|
|
158
|
-
* @throws Error if the model code is not found, listing available models
|
|
159
|
-
*/
|
|
160
|
-
export function validateModelCode(models, modelCode) {
|
|
161
|
-
if (models.length === 0) {
|
|
162
|
-
// API unavailable — accept the value as-is and let the server validate
|
|
163
|
-
return modelCode;
|
|
164
|
-
}
|
|
165
|
-
const match = models.find((m) => m.code === modelCode);
|
|
166
|
-
if (!match) {
|
|
167
|
-
const available = models.map((m) => ` ${m.code} (${m.description})`).join('\n');
|
|
168
|
-
throw new Error(`Unknown model '${modelCode}'.\n\nAvailable models:\n${available}`);
|
|
169
|
-
}
|
|
170
|
-
return match.code;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Pushes a model selection to the server by updating the agent.
|
|
174
|
-
*
|
|
175
|
-
* @param apiKey - User's API key
|
|
176
|
-
* @param agentId - Agent ID to update
|
|
177
|
-
* @param model - Model code to set (e.g. 'openai/gpt-4o')
|
|
178
|
-
* @throws Error if the API call fails
|
|
179
|
-
*/
|
|
180
|
-
export async function updateAgentModel(apiKey, agentId, model) {
|
|
181
|
-
const agentApi = new AgentApi(BASE_URLS.API, apiKey);
|
|
182
|
-
const result = await agentApi.updateAgent(agentId, { model });
|
|
183
|
-
if (!result.success) {
|
|
184
|
-
throw new Error(result.error?.message || 'Failed to update agent model on server');
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Clears the model from the agent on the server, reverting to the platform default.
|
|
189
|
-
*
|
|
190
|
-
* @param apiKey - User's API key
|
|
191
|
-
* @param agentId - Agent ID to update
|
|
192
|
-
* @throws Error if the API call fails
|
|
193
|
-
*/
|
|
194
|
-
export async function clearAgentModel(apiKey, agentId) {
|
|
195
|
-
const agentApi = new AgentApi(BASE_URLS.API, apiKey);
|
|
196
|
-
const result = await agentApi.updateAgent(agentId, { model: null });
|
|
197
|
-
if (!result.success) {
|
|
198
|
-
throw new Error(result.error?.message || 'Failed to clear agent model on server');
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
//# sourceMappingURL=init-agent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init-agent.js","sourceRoot":"","sources":["../../src/utils/init-agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,QAAQ,MAAM,6BAA6B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAAc;IAClD,aAAa,CAAC,4BAA4B,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACrD,MAAM,gBAAgB,GAAG,MAAM,QAAQ,CAAC,aAAa,EAAE,CAAC;IACxD,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/E,aAAa,CAAC,sBAAsB,CAAC,CAAC;IACtC,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAuB;IACzD,4CAA4C;IAC5C,IAAI,iBAAiB,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,IAAe,EAAE,EAAE,CAC1D,qBAAqB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CACjH,CAAC;IAEF,6CAA6C;IAC7C,IAAI,CAAC,iBAAiB,IAA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AC;IACrD,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACpE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,IAAI,uCAAuC,CAAC,CAAC;IACpF,CAAC;AACH,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Init Helper Utilities
|
|
3
|
-
* Helper functions for initialization process
|
|
4
|
-
*/
|
|
5
|
-
import type { PersonaText } from '@lua/shared-types';
|
|
6
|
-
/**
|
|
7
|
-
* Gets the template directory path.
|
|
8
|
-
*
|
|
9
|
-
* @returns Absolute path to template directory
|
|
10
|
-
*/
|
|
11
|
-
export declare function getTemplateDir(): string;
|
|
12
|
-
/**
|
|
13
|
-
* Initializes the project by copying template files and creating YAML.
|
|
14
|
-
*
|
|
15
|
-
* @param agentId - Agent ID for configuration
|
|
16
|
-
* @param orgId - Organization ID for configuration
|
|
17
|
-
* @param persona - Optional persona configuration
|
|
18
|
-
* @param agentName - Optional agent name
|
|
19
|
-
* @param withExamples - Whether to include example skills, tools, jobs, etc. (default: false)
|
|
20
|
-
* @param skipSourceTemplates - Whether to skip src/ templates (if sources restored from backup)
|
|
21
|
-
* @param model - Optional LLM model code (e.g. 'openai/gpt-4o')
|
|
22
|
-
* @returns Current working directory
|
|
23
|
-
*/
|
|
24
|
-
export declare function initializeProject(agentId: string, orgId: string, persona?: PersonaText, agentName?: string, withExamples?: boolean, skipSourceTemplates?: boolean, model?: string): string;
|
|
25
|
-
/**
|
|
26
|
-
* Installs npm dependencies for the project.
|
|
27
|
-
*
|
|
28
|
-
* @param projectDir - Directory to install dependencies in
|
|
29
|
-
*/
|
|
30
|
-
export declare function installDependencies(projectDir: string): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Clears terminal lines if count is greater than zero.
|
|
33
|
-
*
|
|
34
|
-
* @param lineCount - Number of lines to clear
|
|
35
|
-
*/
|
|
36
|
-
export declare function clearLinesIfNeeded(lineCount: number): void;
|
|
37
|
-
//# sourceMappingURL=init-helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/init-helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMrD;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAIvC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,WAAW,EACrB,SAAS,CAAC,EAAE,MAAM,EAClB,YAAY,GAAE,OAAe,EAC7B,mBAAmB,GAAE,OAAe,EACpC,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,CAuBR;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAS3E;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAI1D"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Init Helper Utilities
|
|
3
|
-
* Helper functions for initialization process
|
|
4
|
-
*/
|
|
5
|
-
import { fileURLToPath } from 'url';
|
|
6
|
-
import path from 'path';
|
|
7
|
-
import { copyTemplateFiles, updateYamlAgent } from './files.js';
|
|
8
|
-
import { clearPromptLines, writeProgress } from './cli.js';
|
|
9
|
-
import { execSync } from 'child_process';
|
|
10
|
-
import { updateAgentConfig } from '../compiler/index.js';
|
|
11
|
-
/**
|
|
12
|
-
* Gets the template directory path.
|
|
13
|
-
*
|
|
14
|
-
* @returns Absolute path to template directory
|
|
15
|
-
*/
|
|
16
|
-
export function getTemplateDir() {
|
|
17
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
18
|
-
const __dirname = path.dirname(__filename);
|
|
19
|
-
return path.join(__dirname, '..', '..', 'template');
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Initializes the project by copying template files and creating YAML.
|
|
23
|
-
*
|
|
24
|
-
* @param agentId - Agent ID for configuration
|
|
25
|
-
* @param orgId - Organization ID for configuration
|
|
26
|
-
* @param persona - Optional persona configuration
|
|
27
|
-
* @param agentName - Optional agent name
|
|
28
|
-
* @param withExamples - Whether to include example skills, tools, jobs, etc. (default: false)
|
|
29
|
-
* @param skipSourceTemplates - Whether to skip src/ templates (if sources restored from backup)
|
|
30
|
-
* @param model - Optional LLM model code (e.g. 'openai/gpt-4o')
|
|
31
|
-
* @returns Current working directory
|
|
32
|
-
*/
|
|
33
|
-
export function initializeProject(agentId, orgId, persona, agentName, withExamples = false, skipSourceTemplates = false, model) {
|
|
34
|
-
const templateDir = getTemplateDir();
|
|
35
|
-
const currentDir = process.cwd();
|
|
36
|
-
copyTemplateFiles(templateDir, currentDir, withExamples, skipSourceTemplates);
|
|
37
|
-
// Update the templated lua.skill.yaml with actual agent/org IDs
|
|
38
|
-
updateYamlAgent(agentId, orgId);
|
|
39
|
-
// Update LuaAgent in index.ts with agent configuration (only if src/ was created).
|
|
40
|
-
// Pass persona through unflattened so object-form { base, voice, text } is
|
|
41
|
-
// preserved in source — updateAgentConfig handles both shapes via personaToLiteral.
|
|
42
|
-
if (!skipSourceTemplates) {
|
|
43
|
-
updateAgentConfig({ name: agentName, persona, model }, { projectDir: currentDir });
|
|
44
|
-
writeProgress('✅ Updated LuaAgent configuration');
|
|
45
|
-
}
|
|
46
|
-
writeProgress('✅ Created lua.skill.yaml');
|
|
47
|
-
writeProgress('✅ Copied template files');
|
|
48
|
-
if (withExamples) {
|
|
49
|
-
writeProgress('✅ Included example skills, tools, jobs, and webhooks');
|
|
50
|
-
}
|
|
51
|
-
return currentDir;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Installs npm dependencies for the project.
|
|
55
|
-
*
|
|
56
|
-
* @param projectDir - Directory to install dependencies in
|
|
57
|
-
*/
|
|
58
|
-
export async function installDependencies(projectDir) {
|
|
59
|
-
writeProgress('📦 Installing dependencies...');
|
|
60
|
-
try {
|
|
61
|
-
execSync('npm install --force', { stdio: 'inherit', cwd: projectDir });
|
|
62
|
-
writeProgress('✅ Dependencies installed successfully');
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
writeProgress("⚠️ Warning: Failed to install dependencies automatically. Please run 'npm install' manually.");
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Clears terminal lines if count is greater than zero.
|
|
70
|
-
*
|
|
71
|
-
* @param lineCount - Number of lines to clear
|
|
72
|
-
*/
|
|
73
|
-
export function clearLinesIfNeeded(lineCount) {
|
|
74
|
-
if (lineCount > 0) {
|
|
75
|
-
clearPromptLines(lineCount);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=init-helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init-helpers.js","sourceRoot":"","sources":["../../src/utils/init-helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,I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