lua-cli 3.15.3 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-exports.d.ts +5029 -698
- package/dist/api-exports.js +6509 -772
- package/dist/api-exports.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +41174 -82
- package/dist/index.js.map +1 -1
- package/dist/voice/test/index.d.ts +1217 -0
- package/dist/voice/test/index.js +386 -0
- package/dist/voice/test/index.js.map +1 -0
- package/dist/voice-exports.d.ts +40 -0
- package/dist/voice-exports.js +16 -0
- package/dist/voice-exports.js.map +1 -0
- package/docs/README.md +1 -1
- package/package.json +38 -21
- package/scripts/build-vendor.mjs +6 -3
- package/scripts/run-api-extractor.mjs +79 -0
- package/template/.gitignore +21 -0
- package/template/package.json +1 -1
- package/dist/api/agent.api.service.d.ts +0 -165
- package/dist/api/agent.api.service.d.ts.map +0 -1
- package/dist/api/agent.api.service.js +0 -207
- package/dist/api/agent.api.service.js.map +0 -1
- package/dist/api/agents.api.service.d.ts +0 -21
- package/dist/api/agents.api.service.d.ts.map +0 -1
- package/dist/api/agents.api.service.js +0 -51
- package/dist/api/agents.api.service.js.map +0 -1
- package/dist/api/ai.api.service.d.ts +0 -20
- package/dist/api/ai.api.service.d.ts.map +0 -1
- package/dist/api/ai.api.service.js +0 -40
- package/dist/api/ai.api.service.js.map +0 -1
- package/dist/api/auth.api.service.d.ts +0 -49
- package/dist/api/auth.api.service.d.ts.map +0 -1
- package/dist/api/auth.api.service.js +0 -55
- package/dist/api/auth.api.service.js.map +0 -1
- package/dist/api/backup.api.service.d.ts +0 -78
- package/dist/api/backup.api.service.d.ts.map +0 -1
- package/dist/api/backup.api.service.js +0 -115
- package/dist/api/backup.api.service.js.map +0 -1
- package/dist/api/basket.api.service.d.ts +0 -85
- package/dist/api/basket.api.service.d.ts.map +0 -1
- package/dist/api/basket.api.service.js +0 -160
- package/dist/api/basket.api.service.js.map +0 -1
- package/dist/api/cdn.api.service.d.ts +0 -21
- package/dist/api/cdn.api.service.d.ts.map +0 -1
- package/dist/api/cdn.api.service.js +0 -46
- package/dist/api/cdn.api.service.js.map +0 -1
- package/dist/api/chat.api.service.d.ts +0 -40
- package/dist/api/chat.api.service.d.ts.map +0 -1
- package/dist/api/chat.api.service.js +0 -121
- package/dist/api/chat.api.service.js.map +0 -1
- package/dist/api/credentials.d.ts +0 -25
- package/dist/api/credentials.d.ts.map +0 -1
- package/dist/api/credentials.js +0 -44
- package/dist/api/credentials.js.map +0 -1
- package/dist/api/custom.data.api.service.d.ts +0 -71
- package/dist/api/custom.data.api.service.d.ts.map +0 -1
- package/dist/api/custom.data.api.service.js +0 -126
- package/dist/api/custom.data.api.service.js.map +0 -1
- package/dist/api/developer.api.service.d.ts +0 -121
- package/dist/api/developer.api.service.d.ts.map +0 -1
- package/dist/api/developer.api.service.js +0 -162
- package/dist/api/developer.api.service.js.map +0 -1
- package/dist/api/device-trigger.api.service.d.ts +0 -136
- package/dist/api/device-trigger.api.service.d.ts.map +0 -1
- package/dist/api/device-trigger.api.service.js +0 -120
- package/dist/api/device-trigger.api.service.js.map +0 -1
- package/dist/api/device.api.service.d.ts +0 -61
- package/dist/api/device.api.service.d.ts.map +0 -1
- package/dist/api/device.api.service.js +0 -72
- package/dist/api/device.api.service.js.map +0 -1
- package/dist/api/http.client.d.ts +0 -90
- package/dist/api/http.client.d.ts.map +0 -1
- package/dist/api/http.client.js +0 -265
- package/dist/api/http.client.js.map +0 -1
- package/dist/api/job.api.service.d.ts +0 -154
- package/dist/api/job.api.service.d.ts.map +0 -1
- package/dist/api/job.api.service.js +0 -230
- package/dist/api/job.api.service.js.map +0 -1
- package/dist/api/lazy-instances.d.ts +0 -107
- package/dist/api/lazy-instances.d.ts.map +0 -1
- package/dist/api/lazy-instances.js +0 -220
- package/dist/api/lazy-instances.js.map +0 -1
- package/dist/api/logs.api.service.d.ts +0 -38
- package/dist/api/logs.api.service.d.ts.map +0 -1
- package/dist/api/logs.api.service.js +0 -50
- package/dist/api/logs.api.service.js.map +0 -1
- package/dist/api/marketplace.api.service.d.ts +0 -28
- package/dist/api/marketplace.api.service.d.ts.map +0 -1
- package/dist/api/marketplace.api.service.js +0 -112
- package/dist/api/marketplace.api.service.js.map +0 -1
- package/dist/api/order.api.service.d.ts +0 -53
- package/dist/api/order.api.service.d.ts.map +0 -1
- package/dist/api/order.api.service.js +0 -94
- package/dist/api/order.api.service.js.map +0 -1
- package/dist/api/persona.api.service.d.ts +0 -56
- package/dist/api/persona.api.service.d.ts.map +0 -1
- package/dist/api/persona.api.service.js +0 -90
- package/dist/api/persona.api.service.js.map +0 -1
- package/dist/api/postprocessor.api.service.d.ts +0 -151
- package/dist/api/postprocessor.api.service.d.ts.map +0 -1
- package/dist/api/postprocessor.api.service.js +0 -109
- package/dist/api/postprocessor.api.service.js.map +0 -1
- package/dist/api/preprocessor.api.service.d.ts +0 -155
- package/dist/api/preprocessor.api.service.d.ts.map +0 -1
- package/dist/api/preprocessor.api.service.js +0 -111
- package/dist/api/preprocessor.api.service.js.map +0 -1
- package/dist/api/products.api.service.d.ts +0 -80
- package/dist/api/products.api.service.d.ts.map +0 -1
- package/dist/api/products.api.service.js +0 -126
- package/dist/api/products.api.service.js.map +0 -1
- package/dist/api/resource.api.service.d.ts +0 -77
- package/dist/api/resource.api.service.d.ts.map +0 -1
- package/dist/api/resource.api.service.js +0 -74
- package/dist/api/resource.api.service.js.map +0 -1
- package/dist/api/skills.api.service.d.ts +0 -94
- package/dist/api/skills.api.service.d.ts.map +0 -1
- package/dist/api/skills.api.service.js +0 -120
- package/dist/api/skills.api.service.js.map +0 -1
- package/dist/api/tool.api.service.d.ts +0 -53
- package/dist/api/tool.api.service.d.ts.map +0 -1
- package/dist/api/tool.api.service.js +0 -74
- package/dist/api/tool.api.service.js.map +0 -1
- package/dist/api/unifiedto.api.service.d.ts +0 -133
- package/dist/api/unifiedto.api.service.d.ts.map +0 -1
- package/dist/api/unifiedto.api.service.js +0 -166
- package/dist/api/unifiedto.api.service.js.map +0 -1
- package/dist/api/user.data.api.service.d.ts +0 -69
- package/dist/api/user.data.api.service.d.ts.map +0 -1
- package/dist/api/user.data.api.service.js +0 -158
- package/dist/api/user.data.api.service.js.map +0 -1
- package/dist/api/webhook.api.service.d.ts +0 -163
- package/dist/api/webhook.api.service.d.ts.map +0 -1
- package/dist/api/webhook.api.service.js +0 -140
- package/dist/api/webhook.api.service.js.map +0 -1
- package/dist/api/whatsapp-templates.api.service.d.ts +0 -41
- package/dist/api/whatsapp-templates.api.service.d.ts.map +0 -1
- package/dist/api/whatsapp-templates.api.service.js +0 -79
- package/dist/api/whatsapp-templates.api.service.js.map +0 -1
- package/dist/api-exports.d.ts.map +0 -1
- package/dist/cli/command-definitions.d.ts +0 -29
- package/dist/cli/command-definitions.d.ts.map +0 -1
- package/dist/cli/command-definitions.js +0 -943
- package/dist/cli/command-definitions.js.map +0 -1
- package/dist/commands/admin.d.ts +0 -24
- package/dist/commands/admin.d.ts.map +0 -1
- package/dist/commands/admin.js +0 -44
- package/dist/commands/admin.js.map +0 -1
- package/dist/commands/agents.d.ts +0 -23
- package/dist/commands/agents.d.ts.map +0 -1
- package/dist/commands/agents.js +0 -83
- package/dist/commands/agents.js.map +0 -1
- package/dist/commands/apiKey.d.ts +0 -8
- package/dist/commands/apiKey.d.ts.map +0 -1
- package/dist/commands/apiKey.js +0 -43
- package/dist/commands/apiKey.js.map +0 -1
- package/dist/commands/channels.d.ts +0 -13
- package/dist/commands/channels.d.ts.map +0 -1
- package/dist/commands/channels.js +0 -747
- package/dist/commands/channels.js.map +0 -1
- package/dist/commands/chat-log-probe.d.ts +0 -59
- package/dist/commands/chat-log-probe.d.ts.map +0 -1
- package/dist/commands/chat-log-probe.js +0 -87
- package/dist/commands/chat-log-probe.js.map +0 -1
- package/dist/commands/chat.d.ts +0 -20
- package/dist/commands/chat.d.ts.map +0 -1
- package/dist/commands/chat.js +0 -618
- package/dist/commands/chat.js.map +0 -1
- package/dist/commands/chatClear.d.ts +0 -25
- package/dist/commands/chatClear.d.ts.map +0 -1
- package/dist/commands/chatClear.js +0 -71
- package/dist/commands/chatClear.js.map +0 -1
- package/dist/commands/compile.d.ts +0 -48
- package/dist/commands/compile.d.ts.map +0 -1
- package/dist/commands/compile.js +0 -216
- package/dist/commands/compile.js.map +0 -1
- package/dist/commands/completion.d.ts +0 -12
- package/dist/commands/completion.d.ts.map +0 -1
- package/dist/commands/completion.js +0 -211
- package/dist/commands/completion.js.map +0 -1
- package/dist/commands/configure.d.ts +0 -42
- package/dist/commands/configure.d.ts.map +0 -1
- package/dist/commands/configure.js +0 -76
- package/dist/commands/configure.js.map +0 -1
- package/dist/commands/deploy.d.ts +0 -14
- package/dist/commands/deploy.d.ts.map +0 -1
- package/dist/commands/deploy.js +0 -517
- package/dist/commands/deploy.js.map +0 -1
- package/dist/commands/destroy.d.ts +0 -8
- package/dist/commands/destroy.d.ts.map +0 -1
- package/dist/commands/destroy.js +0 -66
- package/dist/commands/destroy.js.map +0 -1
- package/dist/commands/devices.d.ts +0 -6
- package/dist/commands/devices.d.ts.map +0 -1
- package/dist/commands/devices.js +0 -265
- package/dist/commands/devices.js.map +0 -1
- package/dist/commands/docs.d.ts +0 -20
- package/dist/commands/docs.d.ts.map +0 -1
- package/dist/commands/docs.js +0 -33
- package/dist/commands/docs.js.map +0 -1
- package/dist/commands/env.d.ts +0 -34
- package/dist/commands/env.d.ts.map +0 -1
- package/dist/commands/env.js +0 -612
- package/dist/commands/env.js.map +0 -1
- package/dist/commands/evals.d.ts +0 -9
- package/dist/commands/evals.d.ts.map +0 -1
- package/dist/commands/evals.js +0 -27
- package/dist/commands/evals.js.map +0 -1
- package/dist/commands/features.d.ts +0 -13
- package/dist/commands/features.d.ts.map +0 -1
- package/dist/commands/features.js +0 -455
- package/dist/commands/features.js.map +0 -1
- package/dist/commands/governance.d.ts +0 -7
- package/dist/commands/governance.d.ts.map +0 -1
- package/dist/commands/governance.js +0 -258
- package/dist/commands/governance.js.map +0 -1
- package/dist/commands/index.d.ts +0 -38
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js +0 -38
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/init.d.ts +0 -53
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -992
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/integrations.d.ts +0 -18
- package/dist/commands/integrations.d.ts.map +0 -1
- package/dist/commands/integrations.js +0 -2666
- package/dist/commands/integrations.js.map +0 -1
- package/dist/commands/jobs.d.ts +0 -13
- package/dist/commands/jobs.d.ts.map +0 -1
- package/dist/commands/jobs.js +0 -736
- package/dist/commands/jobs.js.map +0 -1
- package/dist/commands/log-tip.d.ts +0 -79
- package/dist/commands/log-tip.d.ts.map +0 -1
- package/dist/commands/log-tip.js +0 -83
- package/dist/commands/log-tip.js.map +0 -1
- package/dist/commands/logs.d.ts +0 -13
- package/dist/commands/logs.d.ts.map +0 -1
- package/dist/commands/logs.js +0 -493
- package/dist/commands/logs.js.map +0 -1
- package/dist/commands/marketplace.d.ts +0 -34
- package/dist/commands/marketplace.d.ts.map +0 -1
- package/dist/commands/marketplace.js +0 -2105
- package/dist/commands/marketplace.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -32
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -395
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/models.d.ts +0 -18
- package/dist/commands/models.d.ts.map +0 -1
- package/dist/commands/models.js +0 -207
- package/dist/commands/models.js.map +0 -1
- package/dist/commands/persona.d.ts +0 -13
- package/dist/commands/persona.d.ts.map +0 -1
- package/dist/commands/persona.js +0 -560
- package/dist/commands/persona.js.map +0 -1
- package/dist/commands/postprocessors.d.ts +0 -13
- package/dist/commands/postprocessors.d.ts.map +0 -1
- package/dist/commands/postprocessors.js +0 -558
- package/dist/commands/postprocessors.js.map +0 -1
- package/dist/commands/preprocessors.d.ts +0 -13
- package/dist/commands/preprocessors.d.ts.map +0 -1
- package/dist/commands/preprocessors.js +0 -558
- package/dist/commands/preprocessors.js.map +0 -1
- package/dist/commands/production.d.ts +0 -13
- package/dist/commands/production.d.ts.map +0 -1
- package/dist/commands/production.js +0 -588
- package/dist/commands/production.js.map +0 -1
- package/dist/commands/push-helpers.d.ts +0 -42
- package/dist/commands/push-helpers.d.ts.map +0 -1
- package/dist/commands/push-helpers.js +0 -48
- package/dist/commands/push-helpers.js.map +0 -1
- package/dist/commands/push.d.ts +0 -31
- package/dist/commands/push.d.ts.map +0 -1
- package/dist/commands/push.js +0 -1262
- package/dist/commands/push.js.map +0 -1
- package/dist/commands/pushBackup.d.ts +0 -78
- package/dist/commands/pushBackup.d.ts.map +0 -1
- package/dist/commands/pushBackup.js +0 -274
- package/dist/commands/pushBackup.js.map +0 -1
- package/dist/commands/resources.d.ts +0 -13
- package/dist/commands/resources.d.ts.map +0 -1
- package/dist/commands/resources.js +0 -377
- package/dist/commands/resources.js.map +0 -1
- package/dist/commands/skills.d.ts +0 -13
- package/dist/commands/skills.d.ts.map +0 -1
- package/dist/commands/skills.js +0 -618
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/source.d.ts +0 -72
- package/dist/commands/source.d.ts.map +0 -1
- package/dist/commands/source.js +0 -134
- package/dist/commands/source.js.map +0 -1
- package/dist/commands/status.d.ts +0 -14
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -731
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/sync.d.ts +0 -28
- package/dist/commands/sync.d.ts.map +0 -1
- package/dist/commands/sync.js +0 -802
- package/dist/commands/sync.js.map +0 -1
- package/dist/commands/telemetry.d.ts +0 -6
- package/dist/commands/telemetry.d.ts.map +0 -1
- package/dist/commands/telemetry.js +0 -42
- package/dist/commands/telemetry.js.map +0 -1
- package/dist/commands/test-output.helpers.d.ts +0 -24
- package/dist/commands/test-output.helpers.d.ts.map +0 -1
- package/dist/commands/test-output.helpers.js +0 -62
- package/dist/commands/test-output.helpers.js.map +0 -1
- package/dist/commands/test.d.ts +0 -9
- package/dist/commands/test.d.ts.map +0 -1
- package/dist/commands/test.js +0 -787
- package/dist/commands/test.js.map +0 -1
- package/dist/commands/update.d.ts +0 -14
- package/dist/commands/update.d.ts.map +0 -1
- package/dist/commands/update.js +0 -97
- package/dist/commands/update.js.map +0 -1
- package/dist/commands/webhooks.d.ts +0 -13
- package/dist/commands/webhooks.d.ts.map +0 -1
- package/dist/commands/webhooks.js +0 -691
- package/dist/commands/webhooks.js.map +0 -1
- package/dist/compiler/agent-traverser.d.ts +0 -140
- package/dist/compiler/agent-traverser.d.ts.map +0 -1
- package/dist/compiler/agent-traverser.js +0 -420
- package/dist/compiler/agent-traverser.js.map +0 -1
- package/dist/compiler/bundler.d.ts +0 -43
- package/dist/compiler/bundler.d.ts.map +0 -1
- package/dist/compiler/bundler.js +0 -188
- package/dist/compiler/bundler.js.map +0 -1
- package/dist/compiler/compiler.d.ts +0 -208
- package/dist/compiler/compiler.d.ts.map +0 -1
- package/dist/compiler/compiler.js +0 -706
- package/dist/compiler/compiler.js.map +0 -1
- package/dist/compiler/index.d.ts +0 -38
- package/dist/compiler/index.d.ts.map +0 -1
- package/dist/compiler/index.js +0 -43
- package/dist/compiler/index.js.map +0 -1
- package/dist/compiler/plugins/agent.plugin.d.ts +0 -58
- package/dist/compiler/plugins/agent.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/agent.plugin.js +0 -161
- package/dist/compiler/plugins/agent.plugin.js.map +0 -1
- package/dist/compiler/plugins/base.d.ts +0 -334
- package/dist/compiler/plugins/base.d.ts.map +0 -1
- package/dist/compiler/plugins/base.js +0 -353
- package/dist/compiler/plugins/base.js.map +0 -1
- package/dist/compiler/plugins/device-trigger.plugin.d.ts +0 -38
- package/dist/compiler/plugins/device-trigger.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/device-trigger.plugin.js +0 -107
- package/dist/compiler/plugins/device-trigger.plugin.js.map +0 -1
- package/dist/compiler/plugins/device.plugin.d.ts +0 -39
- package/dist/compiler/plugins/device.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/device.plugin.js +0 -77
- package/dist/compiler/plugins/device.plugin.js.map +0 -1
- package/dist/compiler/plugins/job.plugin.d.ts +0 -34
- package/dist/compiler/plugins/job.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/job.plugin.js +0 -108
- package/dist/compiler/plugins/job.plugin.js.map +0 -1
- package/dist/compiler/plugins/mcp-server.plugin.d.ts +0 -38
- package/dist/compiler/plugins/mcp-server.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/mcp-server.plugin.js +0 -107
- package/dist/compiler/plugins/mcp-server.plugin.js.map +0 -1
- package/dist/compiler/plugins/postprocessor.plugin.d.ts +0 -21
- package/dist/compiler/plugins/postprocessor.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/postprocessor.plugin.js +0 -36
- package/dist/compiler/plugins/postprocessor.plugin.js.map +0 -1
- package/dist/compiler/plugins/preprocessor.plugin.d.ts +0 -21
- package/dist/compiler/plugins/preprocessor.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/preprocessor.plugin.js +0 -38
- package/dist/compiler/plugins/preprocessor.plugin.js.map +0 -1
- package/dist/compiler/plugins/processor-base.d.ts +0 -17
- package/dist/compiler/plugins/processor-base.d.ts.map +0 -1
- package/dist/compiler/plugins/processor-base.js +0 -27
- package/dist/compiler/plugins/processor-base.js.map +0 -1
- package/dist/compiler/plugins/registry.d.ts +0 -62
- package/dist/compiler/plugins/registry.d.ts.map +0 -1
- package/dist/compiler/plugins/registry.js +0 -113
- package/dist/compiler/plugins/registry.js.map +0 -1
- package/dist/compiler/plugins/skill.plugin.d.ts +0 -106
- package/dist/compiler/plugins/skill.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/skill.plugin.js +0 -316
- package/dist/compiler/plugins/skill.plugin.js.map +0 -1
- package/dist/compiler/plugins/tool.plugin.d.ts +0 -69
- package/dist/compiler/plugins/tool.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/tool.plugin.js +0 -262
- package/dist/compiler/plugins/tool.plugin.js.map +0 -1
- package/dist/compiler/plugins/webhook.plugin.d.ts +0 -38
- package/dist/compiler/plugins/webhook.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/webhook.plugin.js +0 -117
- package/dist/compiler/plugins/webhook.plugin.js.map +0 -1
- package/dist/compiler/source-writer.d.ts +0 -129
- package/dist/compiler/source-writer.d.ts.map +0 -1
- package/dist/compiler/source-writer.js +0 -329
- package/dist/compiler/source-writer.js.map +0 -1
- package/dist/compiler/types.d.ts +0 -391
- package/dist/compiler/types.d.ts.map +0 -1
- package/dist/compiler/types.js +0 -30
- package/dist/compiler/types.js.map +0 -1
- package/dist/compiler/utils/ast-helpers.d.ts +0 -106
- package/dist/compiler/utils/ast-helpers.d.ts.map +0 -1
- package/dist/compiler/utils/ast-helpers.js +0 -356
- package/dist/compiler/utils/ast-helpers.js.map +0 -1
- package/dist/compiler/utils/common.d.ts +0 -22
- package/dist/compiler/utils/common.d.ts.map +0 -1
- package/dist/compiler/utils/common.js +0 -55
- package/dist/compiler/utils/common.js.map +0 -1
- package/dist/compiler/utils/file-discovery.d.ts +0 -35
- package/dist/compiler/utils/file-discovery.d.ts.map +0 -1
- package/dist/compiler/utils/file-discovery.js +0 -60
- package/dist/compiler/utils/file-discovery.js.map +0 -1
- package/dist/compiler/utils/path-resolver.d.ts +0 -83
- package/dist/compiler/utils/path-resolver.d.ts.map +0 -1
- package/dist/compiler/utils/path-resolver.js +0 -162
- package/dist/compiler/utils/path-resolver.js.map +0 -1
- package/dist/compiler/utils/reference-resolver.d.ts +0 -196
- package/dist/compiler/utils/reference-resolver.d.ts.map +0 -1
- package/dist/compiler/utils/reference-resolver.js +0 -1026
- package/dist/compiler/utils/reference-resolver.js.map +0 -1
- package/dist/compiler/utils/schema-converter.d.ts +0 -52
- package/dist/compiler/utils/schema-converter.d.ts.map +0 -1
- package/dist/compiler/utils/schema-converter.js +0 -170
- package/dist/compiler/utils/schema-converter.js.map +0 -1
- package/dist/compiler/utils/workspace.d.ts +0 -35
- package/dist/compiler/utils/workspace.d.ts.map +0 -1
- package/dist/compiler/utils/workspace.js +0 -121
- package/dist/compiler/utils/workspace.js.map +0 -1
- package/dist/config/compile.constants.d.ts +0 -75
- package/dist/config/compile.constants.d.ts.map +0 -1
- package/dist/config/compile.constants.js +0 -95
- package/dist/config/compile.constants.js.map +0 -1
- package/dist/config/constants.d.ts +0 -49
- package/dist/config/constants.d.ts.map +0 -1
- package/dist/config/constants.js +0 -69
- package/dist/config/constants.js.map +0 -1
- package/dist/errors/auth.error.d.ts +0 -34
- package/dist/errors/auth.error.d.ts.map +0 -1
- package/dist/errors/auth.error.js +0 -29
- package/dist/errors/auth.error.js.map +0 -1
- package/dist/errors/index.d.ts +0 -5
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/index.js +0 -5
- package/dist/errors/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/instances/basket.instance.d.ts +0 -82
- package/dist/instances/basket.instance.d.ts.map +0 -1
- package/dist/instances/basket.instance.js +0 -245
- package/dist/instances/basket.instance.js.map +0 -1
- package/dist/instances/data.entry.instance.d.ts +0 -50
- package/dist/instances/data.entry.instance.d.ts.map +0 -1
- package/dist/instances/data.entry.instance.js +0 -163
- package/dist/instances/data.entry.instance.js.map +0 -1
- package/dist/instances/job.instance.d.ts +0 -133
- package/dist/instances/job.instance.d.ts.map +0 -1
- package/dist/instances/job.instance.js +0 -180
- package/dist/instances/job.instance.js.map +0 -1
- package/dist/instances/order.instance.d.ts +0 -50
- package/dist/instances/order.instance.d.ts.map +0 -1
- package/dist/instances/order.instance.js +0 -199
- package/dist/instances/order.instance.js.map +0 -1
- package/dist/instances/product.instance.d.ts +0 -43
- package/dist/instances/product.instance.d.ts.map +0 -1
- package/dist/instances/product.instance.js +0 -145
- package/dist/instances/product.instance.js.map +0 -1
- package/dist/instances/product.pagination.instance.d.ts +0 -102
- package/dist/instances/product.pagination.instance.d.ts.map +0 -1
- package/dist/instances/product.pagination.instance.js +0 -156
- package/dist/instances/product.pagination.instance.js.map +0 -1
- package/dist/instances/product.search.instance.d.ts +0 -81
- package/dist/instances/product.search.instance.d.ts.map +0 -1
- package/dist/instances/product.search.instance.js +0 -121
- package/dist/instances/product.search.instance.js.map +0 -1
- package/dist/instances/user.instance.d.ts +0 -56
- package/dist/instances/user.instance.d.ts.map +0 -1
- package/dist/instances/user.instance.js +0 -188
- package/dist/instances/user.instance.js.map +0 -1
- package/dist/interfaces/admin.d.ts +0 -64
- package/dist/interfaces/admin.d.ts.map +0 -1
- package/dist/interfaces/admin.js +0 -6
- package/dist/interfaces/admin.js.map +0 -1
- package/dist/interfaces/agent.d.ts +0 -399
- package/dist/interfaces/agent.d.ts.map +0 -1
- package/dist/interfaces/agent.js +0 -6
- package/dist/interfaces/agent.js.map +0 -1
- package/dist/interfaces/backup.d.ts +0 -17
- package/dist/interfaces/backup.d.ts.map +0 -1
- package/dist/interfaces/backup.js +0 -7
- package/dist/interfaces/backup.js.map +0 -1
- package/dist/interfaces/baskets.d.ts +0 -80
- package/dist/interfaces/baskets.d.ts.map +0 -1
- package/dist/interfaces/baskets.js +0 -20
- package/dist/interfaces/baskets.js.map +0 -1
- package/dist/interfaces/cdn.d.ts +0 -25
- package/dist/interfaces/cdn.d.ts.map +0 -1
- package/dist/interfaces/cdn.js +0 -6
- package/dist/interfaces/cdn.js.map +0 -1
- package/dist/interfaces/chat.d.ts +0 -98
- package/dist/interfaces/chat.d.ts.map +0 -1
- package/dist/interfaces/chat.js +0 -6
- package/dist/interfaces/chat.js.map +0 -1
- package/dist/interfaces/common.d.ts +0 -64
- package/dist/interfaces/common.d.ts.map +0 -1
- package/dist/interfaces/common.js +0 -9
- package/dist/interfaces/common.js.map +0 -1
- package/dist/interfaces/custom.data.d.ts +0 -83
- package/dist/interfaces/custom.data.d.ts.map +0 -1
- package/dist/interfaces/custom.data.js +0 -6
- package/dist/interfaces/custom.data.js.map +0 -1
- package/dist/interfaces/deploy.d.ts +0 -15
- package/dist/interfaces/deploy.d.ts.map +0 -1
- package/dist/interfaces/deploy.js +0 -5
- package/dist/interfaces/deploy.js.map +0 -1
- package/dist/interfaces/dev.d.ts +0 -54
- package/dist/interfaces/dev.d.ts.map +0 -1
- package/dist/interfaces/dev.js +0 -6
- package/dist/interfaces/dev.js.map +0 -1
- package/dist/interfaces/device-triggers.d.ts +0 -80
- package/dist/interfaces/device-triggers.d.ts.map +0 -1
- package/dist/interfaces/device-triggers.js +0 -6
- package/dist/interfaces/device-triggers.js.map +0 -1
- package/dist/interfaces/devices.d.ts +0 -74
- package/dist/interfaces/devices.d.ts.map +0 -1
- package/dist/interfaces/devices.js +0 -5
- package/dist/interfaces/devices.js.map +0 -1
- package/dist/interfaces/index.d.ts +0 -15
- package/dist/interfaces/index.d.ts.map +0 -1
- package/dist/interfaces/index.js +0 -8
- package/dist/interfaces/index.js.map +0 -1
- package/dist/interfaces/init.d.ts +0 -42
- package/dist/interfaces/init.d.ts.map +0 -1
- package/dist/interfaces/init.js +0 -5
- package/dist/interfaces/init.js.map +0 -1
- package/dist/interfaces/jobs.d.ts +0 -149
- package/dist/interfaces/jobs.d.ts.map +0 -1
- package/dist/interfaces/jobs.js +0 -6
- package/dist/interfaces/jobs.js.map +0 -1
- package/dist/interfaces/logs.d.ts +0 -44
- package/dist/interfaces/logs.d.ts.map +0 -1
- package/dist/interfaces/logs.js +0 -6
- package/dist/interfaces/logs.js.map +0 -1
- package/dist/interfaces/lua.d.ts +0 -37
- package/dist/interfaces/lua.d.ts.map +0 -1
- package/dist/interfaces/lua.js +0 -6
- package/dist/interfaces/lua.js.map +0 -1
- package/dist/interfaces/marketplace.d.ts +0 -171
- package/dist/interfaces/marketplace.d.ts.map +0 -1
- package/dist/interfaces/marketplace.js +0 -3
- package/dist/interfaces/marketplace.js.map +0 -1
- package/dist/interfaces/mcp.d.ts +0 -96
- package/dist/interfaces/mcp.d.ts.map +0 -1
- package/dist/interfaces/mcp.js +0 -9
- package/dist/interfaces/mcp.js.map +0 -1
- package/dist/interfaces/message.d.ts +0 -16
- package/dist/interfaces/message.d.ts.map +0 -1
- package/dist/interfaces/message.js +0 -2
- package/dist/interfaces/message.js.map +0 -1
- package/dist/interfaces/orders.d.ts +0 -68
- package/dist/interfaces/orders.d.ts.map +0 -1
- package/dist/interfaces/orders.js +0 -20
- package/dist/interfaces/orders.js.map +0 -1
- package/dist/interfaces/persona.d.ts +0 -44
- package/dist/interfaces/persona.d.ts.map +0 -1
- package/dist/interfaces/persona.js +0 -6
- package/dist/interfaces/persona.js.map +0 -1
- package/dist/interfaces/postprocessors.d.ts +0 -15
- package/dist/interfaces/postprocessors.d.ts.map +0 -1
- package/dist/interfaces/postprocessors.js +0 -5
- package/dist/interfaces/postprocessors.js.map +0 -1
- package/dist/interfaces/preprocessors.d.ts +0 -15
- package/dist/interfaces/preprocessors.d.ts.map +0 -1
- package/dist/interfaces/preprocessors.js +0 -5
- package/dist/interfaces/preprocessors.js.map +0 -1
- package/dist/interfaces/product.d.ts +0 -92
- package/dist/interfaces/product.d.ts.map +0 -1
- package/dist/interfaces/product.js +0 -6
- package/dist/interfaces/product.js.map +0 -1
- package/dist/interfaces/push.d.ts +0 -27
- package/dist/interfaces/push.d.ts.map +0 -1
- package/dist/interfaces/push.js +0 -5
- package/dist/interfaces/push.js.map +0 -1
- package/dist/interfaces/skills.d.ts +0 -137
- package/dist/interfaces/skills.d.ts.map +0 -1
- package/dist/interfaces/skills.js +0 -6
- package/dist/interfaces/skills.js.map +0 -1
- package/dist/interfaces/test.d.ts +0 -37
- package/dist/interfaces/test.d.ts.map +0 -1
- package/dist/interfaces/test.js +0 -5
- package/dist/interfaces/test.js.map +0 -1
- package/dist/interfaces/unifiedto.d.ts +0 -141
- package/dist/interfaces/unifiedto.d.ts.map +0 -1
- package/dist/interfaces/unifiedto.js +0 -6
- package/dist/interfaces/unifiedto.js.map +0 -1
- package/dist/interfaces/user.d.ts +0 -75
- package/dist/interfaces/user.d.ts.map +0 -1
- package/dist/interfaces/user.js +0 -2
- package/dist/interfaces/user.js.map +0 -1
- package/dist/interfaces/webhooks.d.ts +0 -97
- package/dist/interfaces/webhooks.d.ts.map +0 -1
- package/dist/interfaces/webhooks.js +0 -6
- package/dist/interfaces/webhooks.js.map +0 -1
- package/dist/interfaces/whatsapp-templates.d.ts +0 -105
- package/dist/interfaces/whatsapp-templates.d.ts.map +0 -1
- package/dist/interfaces/whatsapp-templates.js +0 -6
- package/dist/interfaces/whatsapp-templates.js.map +0 -1
- package/dist/primitives/agent.handler.d.ts +0 -71
- package/dist/primitives/agent.handler.d.ts.map +0 -1
- package/dist/primitives/agent.handler.js +0 -226
- package/dist/primitives/agent.handler.js.map +0 -1
- package/dist/primitives/base.handler.d.ts +0 -229
- package/dist/primitives/base.handler.d.ts.map +0 -1
- package/dist/primitives/base.handler.js +0 -620
- package/dist/primitives/base.handler.js.map +0 -1
- package/dist/primitives/device-trigger.handler.d.ts +0 -56
- package/dist/primitives/device-trigger.handler.d.ts.map +0 -1
- package/dist/primitives/device-trigger.handler.js +0 -99
- package/dist/primitives/device-trigger.handler.js.map +0 -1
- package/dist/primitives/device.handler.d.ts +0 -57
- package/dist/primitives/device.handler.d.ts.map +0 -1
- package/dist/primitives/device.handler.js +0 -103
- package/dist/primitives/device.handler.js.map +0 -1
- package/dist/primitives/index.d.ts +0 -51
- package/dist/primitives/index.d.ts.map +0 -1
- package/dist/primitives/index.js +0 -75
- package/dist/primitives/index.js.map +0 -1
- package/dist/primitives/job.handler.d.ts +0 -53
- package/dist/primitives/job.handler.d.ts.map +0 -1
- package/dist/primitives/job.handler.js +0 -110
- package/dist/primitives/job.handler.js.map +0 -1
- package/dist/primitives/mcp-server.handler.d.ts +0 -93
- package/dist/primitives/mcp-server.handler.d.ts.map +0 -1
- package/dist/primitives/mcp-server.handler.js +0 -216
- package/dist/primitives/mcp-server.handler.js.map +0 -1
- package/dist/primitives/postprocessor.handler.d.ts +0 -44
- package/dist/primitives/postprocessor.handler.d.ts.map +0 -1
- package/dist/primitives/postprocessor.handler.js +0 -71
- package/dist/primitives/postprocessor.handler.js.map +0 -1
- package/dist/primitives/preprocessor.handler.d.ts +0 -44
- package/dist/primitives/preprocessor.handler.d.ts.map +0 -1
- package/dist/primitives/preprocessor.handler.js +0 -72
- package/dist/primitives/preprocessor.handler.js.map +0 -1
- package/dist/primitives/skill.handler.d.ts +0 -47
- package/dist/primitives/skill.handler.d.ts.map +0 -1
- package/dist/primitives/skill.handler.js +0 -229
- package/dist/primitives/skill.handler.js.map +0 -1
- package/dist/primitives/types.d.ts +0 -91
- package/dist/primitives/types.d.ts.map +0 -1
- package/dist/primitives/types.js +0 -17
- package/dist/primitives/types.js.map +0 -1
- package/dist/primitives/webhook.handler.d.ts +0 -47
- package/dist/primitives/webhook.handler.d.ts.map +0 -1
- package/dist/primitives/webhook.handler.js +0 -87
- package/dist/primitives/webhook.handler.js.map +0 -1
- package/dist/services/analytics.d.ts +0 -57
- package/dist/services/analytics.d.ts.map +0 -1
- package/dist/services/analytics.js +0 -317
- package/dist/services/analytics.js.map +0 -1
- package/dist/services/auth.d.ts +0 -72
- package/dist/services/auth.d.ts.map +0 -1
- package/dist/services/auth.js +0 -173
- package/dist/services/auth.js.map +0 -1
- package/dist/services/sandbox.service.d.ts +0 -105
- package/dist/services/sandbox.service.d.ts.map +0 -1
- package/dist/services/sandbox.service.js +0 -531
- package/dist/services/sandbox.service.js.map +0 -1
- package/dist/types/api-contracts.d.ts +0 -287
- package/dist/types/api-contracts.d.ts.map +0 -1
- package/dist/types/api-contracts.js +0 -2
- package/dist/types/api-contracts.js.map +0 -1
- package/dist/types/index.d.ts +0 -28
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -30
- package/dist/types/index.js.map +0 -1
- package/dist/types/skill.d.ts +0 -1079
- package/dist/types/skill.d.ts.map +0 -1
- package/dist/types/skill.js +0 -688
- package/dist/types/skill.js.map +0 -1
- package/dist/types/tool-validation.d.ts +0 -35
- package/dist/types/tool-validation.d.ts.map +0 -1
- package/dist/types/tool-validation.js +0 -43
- package/dist/types/tool-validation.js.map +0 -1
- package/dist/types/yaml.types.d.ts +0 -91
- package/dist/types/yaml.types.d.ts.map +0 -1
- package/dist/types/yaml.types.js +0 -5
- package/dist/types/yaml.types.js.map +0 -1
- package/dist/utils/aliases.d.ts +0 -7
- package/dist/utils/aliases.d.ts.map +0 -1
- package/dist/utils/aliases.js +0 -492
- package/dist/utils/aliases.js.map +0 -1
- package/dist/utils/artifact-loader.d.ts +0 -152
- package/dist/utils/artifact-loader.d.ts.map +0 -1
- package/dist/utils/artifact-loader.js +0 -284
- package/dist/utils/artifact-loader.js.map +0 -1
- package/dist/utils/auth-flows.d.ts +0 -55
- package/dist/utils/auth-flows.d.ts.map +0 -1
- package/dist/utils/auth-flows.js +0 -246
- package/dist/utils/auth-flows.js.map +0 -1
- package/dist/utils/backup-helpers.d.ts +0 -238
- package/dist/utils/backup-helpers.d.ts.map +0 -1
- package/dist/utils/backup-helpers.js +0 -704
- package/dist/utils/backup-helpers.js.map +0 -1
- package/dist/utils/build-manifest-from-disk.d.ts +0 -8
- package/dist/utils/build-manifest-from-disk.d.ts.map +0 -1
- package/dist/utils/build-manifest-from-disk.js +0 -21
- package/dist/utils/build-manifest-from-disk.js.map +0 -1
- package/dist/utils/bundle-upload.d.ts +0 -42
- package/dist/utils/bundle-upload.d.ts.map +0 -1
- package/dist/utils/bundle-upload.js +0 -90
- package/dist/utils/bundle-upload.js.map +0 -1
- package/dist/utils/chat-attachments.d.ts +0 -15
- package/dist/utils/chat-attachments.d.ts.map +0 -1
- package/dist/utils/chat-attachments.js +0 -116
- package/dist/utils/chat-attachments.js.map +0 -1
- package/dist/utils/cli.d.ts +0 -62
- package/dist/utils/cli.d.ts.map +0 -1
- package/dist/utils/cli.js +0 -198
- package/dist/utils/cli.js.map +0 -1
- package/dist/utils/command-utils.d.ts +0 -46
- package/dist/utils/command-utils.d.ts.map +0 -1
- package/dist/utils/command-utils.js +0 -74
- package/dist/utils/command-utils.js.map +0 -1
- package/dist/utils/deploy-helpers.d.ts +0 -40
- package/dist/utils/deploy-helpers.d.ts.map +0 -1
- package/dist/utils/deploy-helpers.js +0 -76
- package/dist/utils/deploy-helpers.js.map +0 -1
- package/dist/utils/env-loader.utils.d.ts +0 -19
- package/dist/utils/env-loader.utils.d.ts.map +0 -1
- package/dist/utils/env-loader.utils.js +0 -90
- package/dist/utils/env-loader.utils.js.map +0 -1
- package/dist/utils/files.d.ts +0 -65
- package/dist/utils/files.d.ts.map +0 -1
- package/dist/utils/files.js +0 -193
- package/dist/utils/files.js.map +0 -1
- package/dist/utils/hints.d.ts +0 -81
- package/dist/utils/hints.d.ts.map +0 -1
- package/dist/utils/hints.js +0 -81
- package/dist/utils/hints.js.map +0 -1
- package/dist/utils/init-agent.d.ts +0 -86
- package/dist/utils/init-agent.d.ts.map +0 -1
- package/dist/utils/init-agent.js +0 -201
- package/dist/utils/init-agent.js.map +0 -1
- package/dist/utils/init-helpers.d.ts +0 -37
- package/dist/utils/init-helpers.d.ts.map +0 -1
- package/dist/utils/init-helpers.js +0 -78
- package/dist/utils/init-helpers.js.map +0 -1
- package/dist/utils/init-prompts.d.ts +0 -74
- package/dist/utils/init-prompts.d.ts.map +0 -1
- package/dist/utils/init-prompts.js +0 -256
- package/dist/utils/init-prompts.js.map +0 -1
- package/dist/utils/prompt-handler.d.ts +0 -17
- package/dist/utils/prompt-handler.d.ts.map +0 -1
- package/dist/utils/prompt-handler.js +0 -49
- package/dist/utils/prompt-handler.js.map +0 -1
- package/dist/utils/sandbox-storage.d.ts +0 -83
- package/dist/utils/sandbox-storage.d.ts.map +0 -1
- package/dist/utils/sandbox-storage.js +0 -211
- package/dist/utils/sandbox-storage.js.map +0 -1
- package/dist/utils/sandbox.d.ts +0 -76
- package/dist/utils/sandbox.d.ts.map +0 -1
- package/dist/utils/sandbox.js +0 -664
- package/dist/utils/sandbox.js.map +0 -1
- package/dist/utils/semver.d.ts +0 -40
- package/dist/utils/semver.d.ts.map +0 -1
- package/dist/utils/semver.js +0 -99
- package/dist/utils/semver.js.map +0 -1
- package/dist/utils/suggest.d.ts +0 -3
- package/dist/utils/suggest.d.ts.map +0 -1
- package/dist/utils/suggest.js +0 -32
- package/dist/utils/suggest.js.map +0 -1
- package/dist/utils/sync-display.d.ts +0 -28
- package/dist/utils/sync-display.d.ts.map +0 -1
- package/dist/utils/sync-display.js +0 -168
- package/dist/utils/sync-display.js.map +0 -1
- package/dist/utils/sync-fetch.d.ts +0 -108
- package/dist/utils/sync-fetch.d.ts.map +0 -1
- package/dist/utils/sync-fetch.js +0 -294
- package/dist/utils/sync-fetch.js.map +0 -1
- package/dist/utils/sync-helpers.d.ts +0 -7
- package/dist/utils/sync-helpers.d.ts.map +0 -1
- package/dist/utils/sync-helpers.js +0 -7
- package/dist/utils/sync-helpers.js.map +0 -1
- package/dist/utils/version-check.d.ts +0 -37
- package/dist/utils/version-check.d.ts.map +0 -1
- package/dist/utils/version-check.js +0 -117
- package/dist/utils/version-check.js.map +0 -1
- package/dist/utils/write-info.d.ts +0 -9
- package/dist/utils/write-info.d.ts.map +0 -1
- package/dist/utils/write-info.js +0 -11
- package/dist/utils/write-info.js.map +0 -1
- package/node_modules/@lua/shared-source-sync/dist/index.d.mts +0 -424
- package/node_modules/@lua/shared-source-sync/dist/index.d.ts +0 -424
- package/node_modules/@lua/shared-source-sync/dist/index.js +0 -536
- package/node_modules/@lua/shared-source-sync/dist/index.mjs +0 -491
- package/node_modules/@lua/shared-source-sync/package.json +0 -26
- package/node_modules/@lua/shared-source-sync/src/archive.ts +0 -98
- package/node_modules/@lua/shared-source-sync/src/filter.ts +0 -72
- package/node_modules/@lua/shared-source-sync/src/hash.ts +0 -40
- package/node_modules/@lua/shared-source-sync/src/http.ts +0 -132
- package/node_modules/@lua/shared-source-sync/src/index.ts +0 -56
- package/node_modules/@lua/shared-source-sync/src/pull.ts +0 -50
- package/node_modules/@lua/shared-source-sync/src/push.ts +0 -94
- package/node_modules/@lua/shared-source-sync/src/restore.ts +0 -83
- package/node_modules/@lua/shared-source-sync/src/skill-source.ts +0 -55
- package/node_modules/@lua/shared-source-sync/src/transfer.ts +0 -92
- package/node_modules/@lua/shared-source-sync/src/types.ts +0 -88
- package/node_modules/@lua/shared-source-sync/src/walk.ts +0 -91
- package/node_modules/@lua/shared-source-sync/tests/archive.test.ts +0 -108
- package/node_modules/@lua/shared-source-sync/tests/hash.test.ts +0 -40
- package/node_modules/@lua/shared-source-sync/tests/http.test.ts +0 -77
- package/node_modules/@lua/shared-source-sync/tests/push.test.ts +0 -162
- package/node_modules/@lua/shared-source-sync/tests/walk.test.ts +0 -84
- package/node_modules/@lua/shared-source-sync/tsconfig.json +0 -12
- package/node_modules/@lua/shared-source-sync/tsup.config.ts +0 -9
- package/node_modules/@lua/shared-source-sync/vitest.config.ts +0 -8
- package/node_modules/@lua/shared-types/dist/index.d.mts +0 -619
- package/node_modules/@lua/shared-types/dist/index.d.ts +0 -619
- package/node_modules/@lua/shared-types/dist/index.js +0 -435
- package/node_modules/@lua/shared-types/dist/index.mjs +0 -394
- package/node_modules/@lua/shared-types/package.json +0 -26
- package/node_modules/@lua/shared-types/src/agent-config.types.ts +0 -45
- package/node_modules/@lua/shared-types/src/agent-invocation.types.ts +0 -73
- package/node_modules/@lua/shared-types/src/ai-generate.types.ts +0 -74
- package/node_modules/@lua/shared-types/src/ai-generate.utils.ts +0 -16
- package/node_modules/@lua/shared-types/src/channel.type.ts +0 -23
- package/node_modules/@lua/shared-types/src/chat-history.types.ts +0 -112
- package/node_modules/@lua/shared-types/src/chat-stream.types.ts +0 -18
- package/node_modules/@lua/shared-types/src/client-tools.types.ts +0 -47
- package/node_modules/@lua/shared-types/src/device.types.ts +0 -190
- package/node_modules/@lua/shared-types/src/index.ts +0 -15
- package/node_modules/@lua/shared-types/src/model-registry.ts +0 -26
- package/node_modules/@lua/shared-types/src/persona-defaults.ts +0 -59
- package/node_modules/@lua/shared-types/src/persona-text.type.ts +0 -92
- package/node_modules/@lua/shared-types/src/sandbox-contract.ts +0 -63
- package/node_modules/@lua/shared-types/src/unstructured-types.ts +0 -58
- package/node_modules/@lua/shared-types/src/vm-execution-log.types.ts +0 -41
- package/node_modules/@lua/shared-types/tsconfig.json +0 -12
- package/node_modules/@lua/shared-types/tsup.config.ts +0 -9
- package/scripts/resolve-workspace-deps.cjs +0 -61
- /package/dist/{compiler/utils/zod-runtime.mjs → zod-runtime.mjs} +0 -0
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Plugin registry for the compilation system.
|
|
3
|
-
*
|
|
4
|
-
* This is where all primitive type plugins are registered.
|
|
5
|
-
* To add a new primitive type:
|
|
6
|
-
* 1. Create a new plugin class implementing CompilationPlugin
|
|
7
|
-
* 2. Import it here
|
|
8
|
-
* 3. Register it in the constructor
|
|
9
|
-
*
|
|
10
|
-
* That's the ONLY place you need to change.
|
|
11
|
-
*/
|
|
12
|
-
import { ToolPlugin } from './tool.plugin.js';
|
|
13
|
-
import { JobPlugin } from './job.plugin.js';
|
|
14
|
-
import { WebhookPlugin } from './webhook.plugin.js';
|
|
15
|
-
import { PreProcessorPlugin } from './preprocessor.plugin.js';
|
|
16
|
-
import { PostProcessorPlugin } from './postprocessor.plugin.js';
|
|
17
|
-
import { MCPServerPlugin } from './mcp-server.plugin.js';
|
|
18
|
-
import { SkillPlugin } from './skill.plugin.js';
|
|
19
|
-
import { AgentPlugin } from './agent.plugin.js';
|
|
20
|
-
import { DevicePlugin } from './device.plugin.js';
|
|
21
|
-
import { DeviceTriggerPlugin } from './device-trigger.plugin.js';
|
|
22
|
-
/**
|
|
23
|
-
* Registry of all compilation plugins.
|
|
24
|
-
*
|
|
25
|
-
* Plugins are looked up by their 'kind' property, which must match
|
|
26
|
-
* the primitive's kind value exactly.
|
|
27
|
-
*/
|
|
28
|
-
export class PluginRegistry {
|
|
29
|
-
constructor() {
|
|
30
|
-
// =========================================================================
|
|
31
|
-
// REGISTER ALL PLUGINS HERE
|
|
32
|
-
// =========================================================================
|
|
33
|
-
// To add a new primitive type, just add a line here:
|
|
34
|
-
this.plugins = new Map();
|
|
35
|
-
this.register(new ToolPlugin());
|
|
36
|
-
this.register(new JobPlugin());
|
|
37
|
-
this.register(new WebhookPlugin());
|
|
38
|
-
this.register(new PreProcessorPlugin());
|
|
39
|
-
this.register(new PostProcessorPlugin());
|
|
40
|
-
this.register(new MCPServerPlugin());
|
|
41
|
-
this.register(new SkillPlugin());
|
|
42
|
-
this.register(new AgentPlugin());
|
|
43
|
-
this.register(new DevicePlugin());
|
|
44
|
-
this.register(new DeviceTriggerPlugin());
|
|
45
|
-
// =========================================================================
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Register a plugin.
|
|
49
|
-
* @throws Error if a plugin with the same kind is already registered
|
|
50
|
-
*/
|
|
51
|
-
register(plugin) {
|
|
52
|
-
if (this.plugins.has(plugin.kind)) {
|
|
53
|
-
throw new Error(`Plugin conflict: A plugin for kind '${plugin.kind}' is already registered. ` +
|
|
54
|
-
`Each primitive type can only have one plugin.`);
|
|
55
|
-
}
|
|
56
|
-
this.plugins.set(plugin.kind, plugin);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Get a plugin by kind.
|
|
60
|
-
*/
|
|
61
|
-
get(kind) {
|
|
62
|
-
return this.plugins.get(kind);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Get all registered plugins.
|
|
66
|
-
*/
|
|
67
|
-
getAll() {
|
|
68
|
-
return Array.from(this.plugins.values());
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Get all registered primitive kinds.
|
|
72
|
-
*/
|
|
73
|
-
getAllKinds() {
|
|
74
|
-
return Array.from(this.plugins.keys());
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Check if a plugin exists for a kind.
|
|
78
|
-
*/
|
|
79
|
-
has(kind) {
|
|
80
|
-
return this.plugins.has(kind);
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Get the number of registered plugins.
|
|
84
|
-
*/
|
|
85
|
-
get size() {
|
|
86
|
-
return this.plugins.size;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
// =============================================================================
|
|
90
|
-
// SINGLETON INSTANCE
|
|
91
|
-
// =============================================================================
|
|
92
|
-
/**
|
|
93
|
-
* The global plugin registry instance.
|
|
94
|
-
* Use this in the compiler and CLI.
|
|
95
|
-
*/
|
|
96
|
-
export const pluginRegistry = new PluginRegistry();
|
|
97
|
-
// =============================================================================
|
|
98
|
-
// HELPER FUNCTIONS
|
|
99
|
-
// =============================================================================
|
|
100
|
-
/**
|
|
101
|
-
* Get all define function names (for detection).
|
|
102
|
-
* E.g., ['defineTool', 'defineJob', 'defineWebhook', ...]
|
|
103
|
-
*/
|
|
104
|
-
export function getAllDefineFunctions() {
|
|
105
|
-
return pluginRegistry.getAll().map((p) => p.defineFunction);
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Get plugin by define function name.
|
|
109
|
-
*/
|
|
110
|
-
export function getPluginByDefineFunction(funcName) {
|
|
111
|
-
return pluginRegistry.getAll().find((p) => p.defineFunction === funcName);
|
|
112
|
-
}
|
|
113
|
-
//# sourceMappingURL=registry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/compiler/plugins/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;A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|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Skill compilation plugin.
|
|
3
|
-
*
|
|
4
|
-
* BACKWARD COMPATIBLE: Detects BOTH patterns:
|
|
5
|
-
* 1. Class-based (legacy): new LuaSkill({ ... })
|
|
6
|
-
* 2. Function-based (new): const mySkill = defineSkill({ ... })
|
|
7
|
-
*
|
|
8
|
-
* Skills are containers that group tools together. Unlike other primitives,
|
|
9
|
-
* skills don't have executable code - they are configuration/metadata that
|
|
10
|
-
* defines tool groupings and shared context.
|
|
11
|
-
*
|
|
12
|
-
* Output: JSON metadata file (not bundled JS) containing:
|
|
13
|
-
* - name, description, context
|
|
14
|
-
* - tool references (names of tools belonging to this skill)
|
|
15
|
-
*/
|
|
16
|
-
import { SourceFile, ObjectLiteralExpression } from 'ts-morph';
|
|
17
|
-
import { type PrimitiveMetadata, type SkillMetadata, type SkillMetadataFields, type ValidationResult, type CompiledPrimitive, type ManifestPrimitive, type BundledArtifact } from '../types.js';
|
|
18
|
-
import { BasePlugin, ReferenceResolverContext } from './base.js';
|
|
19
|
-
/**
|
|
20
|
-
* Plugin for compiling skill primitives.
|
|
21
|
-
* Extends BasePlugin for common detection/entry point logic.
|
|
22
|
-
*/
|
|
23
|
-
export declare class SkillPlugin extends BasePlugin<SkillMetadataFields> {
|
|
24
|
-
readonly kind = "skill";
|
|
25
|
-
readonly displayName = "Skill";
|
|
26
|
-
readonly defineFunction = "defineSkill";
|
|
27
|
-
readonly legacyClassNames: string[];
|
|
28
|
-
/**
|
|
29
|
-
* Extract metadata from skill config object.
|
|
30
|
-
*/
|
|
31
|
-
protected extractFromConfig(config: ObjectLiteralExpression, exportName: string, sourcePath: string, position: {
|
|
32
|
-
line: number;
|
|
33
|
-
column: number;
|
|
34
|
-
}, pattern: 'function' | 'class'): SkillMetadata | null;
|
|
35
|
-
/**
|
|
36
|
-
* Extract tool references from a `tools: [...]` property on a skill config.
|
|
37
|
-
*
|
|
38
|
-
* Uses the shared primitive-array resolver so every shape supported by
|
|
39
|
-
* the agent's own tree walks is supported here too — inline arrays,
|
|
40
|
-
* variable references (same file and cross-file), spreads, re-export
|
|
41
|
-
* barrels, path aliases, property access, etc. The resolver yields
|
|
42
|
-
* `ResolvedRef.identifierName` values (class names like `MyTool`, or
|
|
43
|
-
* variable bindings like `searchTool`) that `resolveReferences()` then
|
|
44
|
-
* feeds into `findImportSource()` to locate each tool's source file.
|
|
45
|
-
*
|
|
46
|
-
* Historical note: the old path also had a `ts-evaluator` fallback that
|
|
47
|
-
* pulled runtime `.name` strings out of the evaluated array. That
|
|
48
|
-
* produced unresolvable refs (the plugin's `resolveClassImport` can't
|
|
49
|
-
* find an import named `my_tool_name`) and introduced a sandboxed-eval
|
|
50
|
-
* surface. The new resolver covers every shape the evaluator handled,
|
|
51
|
-
* staying entirely at the AST level. See reference-resolver.ts.
|
|
52
|
-
*/
|
|
53
|
-
private extractToolRefs;
|
|
54
|
-
/**
|
|
55
|
-
* Detect tools added via `.addTools([...])` or `.addTool(new Tool())`
|
|
56
|
-
* method calls. These are an alternative to the constructor `tools: [...]`
|
|
57
|
-
* array.
|
|
58
|
-
*
|
|
59
|
-
* `.addTools([...])` is routed through the shared resolver (same shapes,
|
|
60
|
-
* same deopt diagnostics). `.addTool(arg)` handles the singleton case:
|
|
61
|
-
* either a `new X()` or a bare identifier.
|
|
62
|
-
*/
|
|
63
|
-
private extractToolRefsFromMethodCalls;
|
|
64
|
-
validate(metadata: SkillMetadata): ValidationResult;
|
|
65
|
-
/**
|
|
66
|
-
* Strip `toolRefSourcePaths` from the persisted metadata shape.
|
|
67
|
-
*
|
|
68
|
-
* Those paths are absolute build-machine paths used internally by
|
|
69
|
-
* `resolveReferences` to skip re-walking import chains; they must
|
|
70
|
-
* NOT end up in any deliverable because:
|
|
71
|
-
* 1. They make content hashes non-reproducible across machines/CI.
|
|
72
|
-
* 2. They leak the developer's filesystem layout downstream.
|
|
73
|
-
*
|
|
74
|
-
* Called by both `buildArtifact` (for the on-disk artifact code) and
|
|
75
|
-
* by the compiler's sidecar JSON writer, so both paths share the
|
|
76
|
-
* same sanitization.
|
|
77
|
-
*/
|
|
78
|
-
sanitizeForPersistence(metadata: PrimitiveMetadata['metadata']): PrimitiveMetadata['metadata'];
|
|
79
|
-
/**
|
|
80
|
-
* Skills have no executable code and their artifact is never loaded at
|
|
81
|
-
* runtime (see `SkillHandler.prepareForPush` — it loads tool artifacts
|
|
82
|
-
* but never the skill's own). Emit a JSON metadata artifact instead of
|
|
83
|
-
* running esbuild on `new LuaSkill({...})`, which would otherwise bundle
|
|
84
|
-
* a non-executable shell (LuaSkill is stripped as an external import).
|
|
85
|
-
*/
|
|
86
|
-
buildArtifact(metadata: PrimitiveMetadata): Promise<BundledArtifact>;
|
|
87
|
-
/**
|
|
88
|
-
* Resolve tool references from this skill.
|
|
89
|
-
*
|
|
90
|
-
* Skills reference tools by class/variable name. This method:
|
|
91
|
-
* 1. Finds where each tool is imported from
|
|
92
|
-
* 2. Uses ToolPlugin to detect the tool in that file
|
|
93
|
-
* 3. Returns the tool metadata for compilation
|
|
94
|
-
*/
|
|
95
|
-
resolveReferences(metadata: PrimitiveMetadata, sourceFile: SourceFile, context: ReferenceResolverContext): PrimitiveMetadata[];
|
|
96
|
-
/**
|
|
97
|
-
* Resolve a class import to its source file path.
|
|
98
|
-
*/
|
|
99
|
-
private resolveClassImport;
|
|
100
|
-
/**
|
|
101
|
-
* Create the manifest entry for a skill.
|
|
102
|
-
* Resolves tool class/variable names to actual tool names using allPrimitives.
|
|
103
|
-
*/
|
|
104
|
-
toManifestEntry(compiled: CompiledPrimitive, allPrimitives?: CompiledPrimitive[]): ManifestPrimitive;
|
|
105
|
-
}
|
|
106
|
-
//# sourceMappingURL=skill.plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill.plugin.d.ts","sourceRoot":"","sources":["../../../src/compiler/plugins/skill.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;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EACtB,OAAO,EAAE,wBAAwB,GAChC,iBAAiB,EAAE;IAiFtB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAQ1B;;;OAGG;IACH,eAAe,CAAC,QAAQ,EAAE,iBAAiB,EAAE,aAAa,CAAC,EAAE,iBAAiB,EAAE,GAAG,iBAAiB;CAoBrG"}
|
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Skill compilation plugin.
|
|
3
|
-
*
|
|
4
|
-
* BACKWARD COMPATIBLE: Detects BOTH patterns:
|
|
5
|
-
* 1. Class-based (legacy): new LuaSkill({ ... })
|
|
6
|
-
* 2. Function-based (new): const mySkill = defineSkill({ ... })
|
|
7
|
-
*
|
|
8
|
-
* Skills are containers that group tools together. Unlike other primitives,
|
|
9
|
-
* skills don't have executable code - they are configuration/metadata that
|
|
10
|
-
* defines tool groupings and shared context.
|
|
11
|
-
*
|
|
12
|
-
* Output: JSON metadata file (not bundled JS) containing:
|
|
13
|
-
* - name, description, context
|
|
14
|
-
* - tool references (names of tools belonging to this skill)
|
|
15
|
-
*/
|
|
16
|
-
import fs from 'fs/promises';
|
|
17
|
-
import { Node } from 'ts-morph';
|
|
18
|
-
import { findImportSource } from '../utils/ast-helpers.js';
|
|
19
|
-
import { hashContent } from '../utils/common.js';
|
|
20
|
-
import { BasePlugin, validationWarning } from './base.js';
|
|
21
|
-
import { extractPolymorphicProperty } from '../utils/ast-helpers.js';
|
|
22
|
-
import { resolveArrayRefs, reportDeopt, formatSarifWarning } from '../utils/reference-resolver.js';
|
|
23
|
-
/**
|
|
24
|
-
* Plugin for compiling skill primitives.
|
|
25
|
-
* Extends BasePlugin for common detection/entry point logic.
|
|
26
|
-
*/
|
|
27
|
-
export class SkillPlugin extends BasePlugin {
|
|
28
|
-
constructor() {
|
|
29
|
-
super(...arguments);
|
|
30
|
-
this.kind = 'skill';
|
|
31
|
-
this.displayName = 'Skill';
|
|
32
|
-
this.defineFunction = 'defineSkill';
|
|
33
|
-
this.legacyClassNames = ['LuaSkill'];
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Extract metadata from skill config object.
|
|
37
|
-
*/
|
|
38
|
-
extractFromConfig(config, exportName, sourcePath, position, pattern) {
|
|
39
|
-
const common = this.extractCommonFields(config, exportName, sourcePath, position);
|
|
40
|
-
if (!common)
|
|
41
|
-
return null;
|
|
42
|
-
const context = extractPolymorphicProperty(config, 'context', ['base', 'voice', 'text']);
|
|
43
|
-
// Extract tool references from constructor tools array. The resolver
|
|
44
|
-
// returns both the identifier names AND the source file where each
|
|
45
|
-
// was declared (following barrels, wildcard exports, path aliases) —
|
|
46
|
-
// we keep both here so `resolveReferences()` doesn't need to walk the
|
|
47
|
-
// skill's imports a second time via the simpler `findImportSource`
|
|
48
|
-
// helper, which can't traverse re-export chains.
|
|
49
|
-
const toolRefsWithSource = this.extractToolRefs(config);
|
|
50
|
-
// Also detect tools added via .addTools() / .addTool() method calls.
|
|
51
|
-
// Those go through the same resolver, so we treat them uniformly.
|
|
52
|
-
const methodToolRefs = this.extractToolRefsFromMethodCalls(config.getSourceFile());
|
|
53
|
-
const allRefs = [...toolRefsWithSource, ...methodToolRefs];
|
|
54
|
-
const toolRefs = allRefs.map((r) => r.className);
|
|
55
|
-
const toolRefSourcePaths = {};
|
|
56
|
-
for (const r of allRefs) {
|
|
57
|
-
if (r.sourcePath)
|
|
58
|
-
toolRefSourcePaths[r.className] = r.sourcePath;
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
kind: this.kind,
|
|
62
|
-
...common,
|
|
63
|
-
metadata: {
|
|
64
|
-
pattern,
|
|
65
|
-
context,
|
|
66
|
-
toolRefs,
|
|
67
|
-
toolRefSourcePaths: Object.keys(toolRefSourcePaths).length > 0 ? toolRefSourcePaths : undefined,
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Extract tool references from a `tools: [...]` property on a skill config.
|
|
73
|
-
*
|
|
74
|
-
* Uses the shared primitive-array resolver so every shape supported by
|
|
75
|
-
* the agent's own tree walks is supported here too — inline arrays,
|
|
76
|
-
* variable references (same file and cross-file), spreads, re-export
|
|
77
|
-
* barrels, path aliases, property access, etc. The resolver yields
|
|
78
|
-
* `ResolvedRef.identifierName` values (class names like `MyTool`, or
|
|
79
|
-
* variable bindings like `searchTool`) that `resolveReferences()` then
|
|
80
|
-
* feeds into `findImportSource()` to locate each tool's source file.
|
|
81
|
-
*
|
|
82
|
-
* Historical note: the old path also had a `ts-evaluator` fallback that
|
|
83
|
-
* pulled runtime `.name` strings out of the evaluated array. That
|
|
84
|
-
* produced unresolvable refs (the plugin's `resolveClassImport` can't
|
|
85
|
-
* find an import named `my_tool_name`) and introduced a sandboxed-eval
|
|
86
|
-
* surface. The new resolver covers every shape the evaluator handled,
|
|
87
|
-
* staying entirely at the AST level. See reference-resolver.ts.
|
|
88
|
-
*/
|
|
89
|
-
extractToolRefs(config) {
|
|
90
|
-
const toolsProp = config.getProperty('tools');
|
|
91
|
-
if (!toolsProp || !Node.isPropertyAssignment(toolsProp))
|
|
92
|
-
return [];
|
|
93
|
-
const toolsValue = toolsProp.getInitializer();
|
|
94
|
-
if (!toolsValue)
|
|
95
|
-
return [];
|
|
96
|
-
const project = config.getSourceFile().getProject();
|
|
97
|
-
const result = resolveArrayRefs(toolsValue, { project });
|
|
98
|
-
if (!result.confident) {
|
|
99
|
-
console.warn(reportDeopt(result, 'tools'));
|
|
100
|
-
}
|
|
101
|
-
return result.value.map((r) => ({
|
|
102
|
-
className: r.identifierName,
|
|
103
|
-
// Carry the resolver-discovered source file through to
|
|
104
|
-
// `resolveReferences`. Preserves barrel / re-export / wildcard
|
|
105
|
-
// resolution that `findImportSource` can't replicate.
|
|
106
|
-
sourcePath: r.sourceFile.getFilePath(),
|
|
107
|
-
}));
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Detect tools added via `.addTools([...])` or `.addTool(new Tool())`
|
|
111
|
-
* method calls. These are an alternative to the constructor `tools: [...]`
|
|
112
|
-
* array.
|
|
113
|
-
*
|
|
114
|
-
* `.addTools([...])` is routed through the shared resolver (same shapes,
|
|
115
|
-
* same deopt diagnostics). `.addTool(arg)` handles the singleton case:
|
|
116
|
-
* either a `new X()` or a bare identifier.
|
|
117
|
-
*/
|
|
118
|
-
extractToolRefsFromMethodCalls(sourceFile) {
|
|
119
|
-
const refs = [];
|
|
120
|
-
const project = sourceFile.getProject();
|
|
121
|
-
sourceFile.forEachDescendant((node) => {
|
|
122
|
-
if (!Node.isCallExpression(node))
|
|
123
|
-
return;
|
|
124
|
-
const expression = node.getExpression();
|
|
125
|
-
if (!Node.isPropertyAccessExpression(expression))
|
|
126
|
-
return;
|
|
127
|
-
const property = expression.getName();
|
|
128
|
-
if (property !== 'addTools' && property !== 'addTool')
|
|
129
|
-
return;
|
|
130
|
-
const args = node.getArguments();
|
|
131
|
-
if (args.length === 0)
|
|
132
|
-
return;
|
|
133
|
-
if (property === 'addTools') {
|
|
134
|
-
const result = resolveArrayRefs(args[0], { project });
|
|
135
|
-
if (!result.confident) {
|
|
136
|
-
console.warn(reportDeopt(result, 'addTools'));
|
|
137
|
-
}
|
|
138
|
-
for (const ref of result.value) {
|
|
139
|
-
refs.push({
|
|
140
|
-
className: ref.identifierName,
|
|
141
|
-
sourcePath: ref.sourceFile.getFilePath(),
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
// property === 'addTool': a single tool. Treat it as a one-element
|
|
147
|
-
// array by synthesizing one via the resolver's element walker would
|
|
148
|
-
// be overkill — the inline-vs-identifier dichotomy is narrow enough
|
|
149
|
-
// to inline here. No sourcePath is recorded for these; the legacy
|
|
150
|
-
// `findImportSource` path handles them just fine since they're
|
|
151
|
-
// always same-file shapes.
|
|
152
|
-
const arg = args[0];
|
|
153
|
-
if (Node.isNewExpression(arg)) {
|
|
154
|
-
refs.push({ className: arg.getExpression().getText() });
|
|
155
|
-
}
|
|
156
|
-
else if (Node.isIdentifier(arg)) {
|
|
157
|
-
refs.push({ className: arg.getText() });
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
return refs;
|
|
161
|
-
}
|
|
162
|
-
validate(metadata) {
|
|
163
|
-
const { errors, warnings } = this.baseValidation(metadata);
|
|
164
|
-
if (metadata.metadata.toolRefs.length === 0) {
|
|
165
|
-
warnings.push(validationWarning('Skill has no tools - consider adding tools or removing the skill', { line: metadata.line }));
|
|
166
|
-
}
|
|
167
|
-
const context = metadata.metadata.context;
|
|
168
|
-
if (!context || (typeof context === 'object' && !context.base && !context.voice && !context.text)) {
|
|
169
|
-
warnings.push(validationWarning('Skill should have a context', { line: metadata.line }));
|
|
170
|
-
}
|
|
171
|
-
return { valid: errors.length === 0, errors, warnings };
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Strip `toolRefSourcePaths` from the persisted metadata shape.
|
|
175
|
-
*
|
|
176
|
-
* Those paths are absolute build-machine paths used internally by
|
|
177
|
-
* `resolveReferences` to skip re-walking import chains; they must
|
|
178
|
-
* NOT end up in any deliverable because:
|
|
179
|
-
* 1. They make content hashes non-reproducible across machines/CI.
|
|
180
|
-
* 2. They leak the developer's filesystem layout downstream.
|
|
181
|
-
*
|
|
182
|
-
* Called by both `buildArtifact` (for the on-disk artifact code) and
|
|
183
|
-
* by the compiler's sidecar JSON writer, so both paths share the
|
|
184
|
-
* same sanitization.
|
|
185
|
-
*/
|
|
186
|
-
sanitizeForPersistence(metadata) {
|
|
187
|
-
const { toolRefSourcePaths: _stripped, ...rest } = metadata;
|
|
188
|
-
void _stripped;
|
|
189
|
-
return rest;
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Skills have no executable code and their artifact is never loaded at
|
|
193
|
-
* runtime (see `SkillHandler.prepareForPush` — it loads tool artifacts
|
|
194
|
-
* but never the skill's own). Emit a JSON metadata artifact instead of
|
|
195
|
-
* running esbuild on `new LuaSkill({...})`, which would otherwise bundle
|
|
196
|
-
* a non-executable shell (LuaSkill is stripped as an external import).
|
|
197
|
-
*/
|
|
198
|
-
async buildArtifact(metadata) {
|
|
199
|
-
const code = JSON.stringify({
|
|
200
|
-
kind: metadata.kind,
|
|
201
|
-
name: metadata.name,
|
|
202
|
-
description: metadata.description,
|
|
203
|
-
metadata: this.sanitizeForPersistence(metadata.metadata),
|
|
204
|
-
}, null, 2);
|
|
205
|
-
const originalSource = await fs.readFile(metadata.sourcePath, 'utf-8');
|
|
206
|
-
return {
|
|
207
|
-
code,
|
|
208
|
-
sourceMap: '',
|
|
209
|
-
originalSource,
|
|
210
|
-
size: Buffer.byteLength(code, 'utf8'),
|
|
211
|
-
hash: hashContent(code),
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Resolve tool references from this skill.
|
|
216
|
-
*
|
|
217
|
-
* Skills reference tools by class/variable name. This method:
|
|
218
|
-
* 1. Finds where each tool is imported from
|
|
219
|
-
* 2. Uses ToolPlugin to detect the tool in that file
|
|
220
|
-
* 3. Returns the tool metadata for compilation
|
|
221
|
-
*/
|
|
222
|
-
resolveReferences(metadata, sourceFile, context) {
|
|
223
|
-
const skillMeta = metadata.metadata;
|
|
224
|
-
const toolRefs = skillMeta.toolRefs || [];
|
|
225
|
-
const toolRefSourcePaths = skillMeta.toolRefSourcePaths ?? {};
|
|
226
|
-
if (toolRefs.length === 0) {
|
|
227
|
-
return [];
|
|
228
|
-
}
|
|
229
|
-
const toolPlugin = context.getPlugin('tool');
|
|
230
|
-
if (!toolPlugin) {
|
|
231
|
-
context.log('⚠️ No plugin registered for tool');
|
|
232
|
-
return [];
|
|
233
|
-
}
|
|
234
|
-
const tools = [];
|
|
235
|
-
const skillFilePath = sourceFile.getFilePath();
|
|
236
|
-
for (const className of toolRefs) {
|
|
237
|
-
// Prefer the source file the reference resolver already discovered
|
|
238
|
-
// (follows re-export barrels / wildcard / path aliases). Fall back
|
|
239
|
-
// to `findImportSource` only when the ref didn't go through the
|
|
240
|
-
// resolver (e.g. the `.addTool(new X())` inline case).
|
|
241
|
-
const toolSourcePath = toolRefSourcePaths[className] ?? this.resolveClassImport(className, sourceFile, context);
|
|
242
|
-
if (!toolSourcePath) {
|
|
243
|
-
// Visible by default — a skill declares this tool but we can't
|
|
244
|
-
// locate an import for it. Previously this failed silently
|
|
245
|
-
// (context.log is gated on debug), making it hard for users to
|
|
246
|
-
// understand why their skill's tool array shrank between compile
|
|
247
|
-
// and push.
|
|
248
|
-
console.warn(formatSarifWarning({
|
|
249
|
-
ruleId: 'lua/missing-tool-import',
|
|
250
|
-
filePath: skillFilePath,
|
|
251
|
-
message: `skill "${metadata.name}" references tool "${className}" but no ` + `import for that name was found`,
|
|
252
|
-
hint: `import ${className} from its source file, or remove the entry ` + `from the skill's tools array`,
|
|
253
|
-
}));
|
|
254
|
-
continue;
|
|
255
|
-
}
|
|
256
|
-
try {
|
|
257
|
-
const toolFile = context.project.addSourceFileAtPath(toolSourcePath);
|
|
258
|
-
const detected = toolPlugin.detect(toolFile);
|
|
259
|
-
const match = detected.find((d) => {
|
|
260
|
-
const toolMeta = d.metadata;
|
|
261
|
-
return d.exportName === className || d.name === className || toolMeta.className === className;
|
|
262
|
-
}) || (detected.length === 1 ? detected[0] : null);
|
|
263
|
-
if (match) {
|
|
264
|
-
tools.push(match);
|
|
265
|
-
}
|
|
266
|
-
else {
|
|
267
|
-
console.warn(formatSarifWarning({
|
|
268
|
-
ruleId: 'lua/missing-primitive-declaration',
|
|
269
|
-
filePath: toolSourcePath,
|
|
270
|
-
message: `skill "${metadata.name}" references tool "${className}" but the ` +
|
|
271
|
-
`target file does not define a matching tool`,
|
|
272
|
-
hint: `define and export "${className}" in that file, or point the ` + `skill at the correct module`,
|
|
273
|
-
}));
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
catch (error) {
|
|
277
|
-
console.warn(formatSarifWarning({
|
|
278
|
-
ruleId: 'lua/missing-primitive-declaration',
|
|
279
|
-
filePath: toolSourcePath,
|
|
280
|
-
message: `error extracting tool "${className}": ` + (error instanceof Error ? error.message : String(error)),
|
|
281
|
-
}));
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
return tools;
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Resolve a class import to its source file path.
|
|
288
|
-
*/
|
|
289
|
-
resolveClassImport(className, sourceFile, context) {
|
|
290
|
-
return findImportSource(className, sourceFile, context.resolveImportPath);
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Create the manifest entry for a skill.
|
|
294
|
-
* Resolves tool class/variable names to actual tool names using allPrimitives.
|
|
295
|
-
*/
|
|
296
|
-
toManifestEntry(compiled, allPrimitives) {
|
|
297
|
-
const skillMetadata = compiled.metadata;
|
|
298
|
-
const toolRefs = skillMetadata.toolRefs || [];
|
|
299
|
-
// Resolve tool class/variable names to actual tool names
|
|
300
|
-
const toolNames = toolRefs.map((ref) => {
|
|
301
|
-
const tool = allPrimitives?.find((p) => {
|
|
302
|
-
if (p.kind !== 'tool')
|
|
303
|
-
return false;
|
|
304
|
-
const toolMeta = p.metadata;
|
|
305
|
-
return p.exportName === ref || p.name === ref || toolMeta.className === ref;
|
|
306
|
-
});
|
|
307
|
-
return tool?.name || ref;
|
|
308
|
-
});
|
|
309
|
-
return {
|
|
310
|
-
...this.baseManifestFields(compiled),
|
|
311
|
-
context: skillMetadata.context,
|
|
312
|
-
tools: toolNames,
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
//# sourceMappingURL=skill.plugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill.plugin.js","sourceRoot":"","sources":["../../../src/compiler/plugins/skill.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAc,IAAI,EAA+C,MAAM,UAAU,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAA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C;QAEjC,OAAO,gBAAgB,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC5E,CAAC;IAED;;;OAGG;IACH,eAAe,CAAC,QAA2B,EAAE,aAAmC;QAC9E,MAAM,aAAa,GAAG,QAAQ,CAAC,QAA+B,CAAC;QAC/D,MAAM,QAAQ,GAAG,aAAa,CAAC,QAAQ,IAAI,EAAE,CAAC;QAE9C,yDAAyD;QACzD,MAAM,SAAS,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YACrC,MAAM,IAAI,GAAG,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;gBACrC,IAAI,CAAC,CAAC,IAAI,KAAK,MAAM;oBAAE,OAAO,KAAK,CAAC;gBACpC,MAAM,QAAQ,GAAG,CAAC,CAAC,QAA8B,CAAC;gBAClD,OAAO,CAAC,CAAC,UAAU,KAAK,GAAG,IAAI,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,QAAQ,CAAC,SAAS,KAAK,GAAG,CAAC;YAC9E,CAAC,CAAC,CAAC;YACH,OAAO,IAAI,EAAE,IAAI,IAAI,GAAG,CAAC;QAC3B,CAAC,CAAC,CAAC;QAEH,OAAO;YACL,GAAG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC;YACpC,OAAO,EAAE,aAAa,CAAC,OAAO;YAC9B,KAAK,EAAE,SAAS;SACA,CAAC;IACrB,CAAC;CACF"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tool compilation plugin.
|
|
3
|
-
*
|
|
4
|
-
* BACKWARD COMPATIBLE: Detects BOTH patterns:
|
|
5
|
-
* 1. Class-based (legacy): class MyTool extends LuaTool { ... }
|
|
6
|
-
* 2. Function-based (new): const myTool = defineTool({ ... })
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This plugin extends BasePlugin but overrides class-based detection because:
|
|
9
|
-
* - Class-based tools use extends/implements detection (not `new LuaTool` instantiation)
|
|
10
|
-
* - Class-based metadata is extracted from class properties, not config objects
|
|
11
|
-
* - Entry point generation differs significantly for class-based tools
|
|
12
|
-
*/
|
|
13
|
-
import { SourceFile, Project, ObjectLiteralExpression } from 'ts-morph';
|
|
14
|
-
import { type ToolMetadata, type ToolMetadataFields, type ValidationResult, type SchemaSet, type CompiledPrimitive, type ManifestPrimitive, type PrimitiveMetadata } from '../types.js';
|
|
15
|
-
import { BasePlugin } from './base.js';
|
|
16
|
-
/**
|
|
17
|
-
* Plugin for compiling tool primitives.
|
|
18
|
-
* Extends BasePlugin for function-based detection; overrides class-based detection.
|
|
19
|
-
*/
|
|
20
|
-
export declare class ToolPlugin extends BasePlugin<ToolMetadataFields> {
|
|
21
|
-
readonly kind = "tool";
|
|
22
|
-
readonly displayName = "Tool";
|
|
23
|
-
readonly defineFunction = "defineTool";
|
|
24
|
-
readonly legacyClassNames: string[];
|
|
25
|
-
/**
|
|
26
|
-
* Extract metadata from tool config object (function-based pattern).
|
|
27
|
-
* Used by BasePlugin's detectFunctionBased().
|
|
28
|
-
*/
|
|
29
|
-
protected extractFromConfig(config: ObjectLiteralExpression, exportName: string, sourcePath: string, position: {
|
|
30
|
-
line: number;
|
|
31
|
-
column: number;
|
|
32
|
-
}, pattern: 'function' | 'class'): ToolMetadata | null;
|
|
33
|
-
/**
|
|
34
|
-
* Override class-based detection to detect class DEFINITIONS (extends/implements)
|
|
35
|
-
* instead of class INSTANTIATIONS (new LuaTool).
|
|
36
|
-
*
|
|
37
|
-
* Detects:
|
|
38
|
-
* - class MyTool extends LuaTool { ... }
|
|
39
|
-
* - export default class MyTool extends LuaTool { ... }
|
|
40
|
-
*/
|
|
41
|
-
protected detectClassBased(sourceFile: SourceFile, primitives: PrimitiveMetadata<ToolMetadataFields>[]): void;
|
|
42
|
-
/**
|
|
43
|
-
* Check if a class extends or implements LuaTool.
|
|
44
|
-
*/
|
|
45
|
-
private isToolClass;
|
|
46
|
-
/**
|
|
47
|
-
* Extract a string property from a class declaration.
|
|
48
|
-
* Uses ts-evaluator for full expression evaluation.
|
|
49
|
-
*/
|
|
50
|
-
private extractClassProperty;
|
|
51
|
-
validate(metadata: ToolMetadata): ValidationResult;
|
|
52
|
-
/**
|
|
53
|
-
* Override entry point generation to handle class-based tools specially.
|
|
54
|
-
* Function-based tools use BasePlugin's implementation.
|
|
55
|
-
*/
|
|
56
|
-
generateEntryPoint(metadata: ToolMetadata): string;
|
|
57
|
-
/**
|
|
58
|
-
* Generate entry point for class-based tools.
|
|
59
|
-
* Creates an instance and wraps it in the standard primitive format.
|
|
60
|
-
*/
|
|
61
|
-
private generateClassBasedEntryPoint;
|
|
62
|
-
/**
|
|
63
|
-
* Add runtime validation for execute function.
|
|
64
|
-
*/
|
|
65
|
-
protected getRuntimeValidation(): string;
|
|
66
|
-
extractSchemas(metadata: ToolMetadata, project: Project): Promise<SchemaSet | undefined>;
|
|
67
|
-
toManifestEntry(compiled: CompiledPrimitive, _allPrimitives?: CompiledPrimitive[]): ManifestPrimitive;
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=tool.plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool.plugin.d.ts","sourceRoot":"","sources":["../../../src/compiler/plugins/tool.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,OAAO,EAAQ,uBAAuB,EAAoB,MAAM,UAAU,CAAC;AAChG,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAEd,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EAEtB,KAAK,iBAAiB,EACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAsC,MAAM,WAAW,CAAC;AAI3E;;;GAGG;AACH,qBAAa,UAAW,SAAQ,UAAU,CAAC,kBAAkB,CAAC;IAC5D,QAAQ,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