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,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hashing primitives.
|
|
3
|
-
*
|
|
4
|
-
* Wire-format note: the rest of the Lua platform (compiler, CLI cache, server
|
|
5
|
-
* blob keys) uses the FIRST 16 HEX CHARS of SHA-256 as the file hash. This
|
|
6
|
-
* truncation is part of the protocol — full 64-char digests would be
|
|
7
|
-
* incompatible with the existing S3 layout and dedup. `hashContentTruncated`
|
|
8
|
-
* is the canonical helper; callers should not roll their own.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { createHash } from 'crypto';
|
|
12
|
-
|
|
13
|
-
/** Default truncation length used across the Lua platform. */
|
|
14
|
-
export const FILE_HASH_LENGTH = 16;
|
|
15
|
-
|
|
16
|
-
/** Hash file content with the canonical 16-char truncated SHA-256. */
|
|
17
|
-
export function hashContentTruncated(content: string | Buffer): string {
|
|
18
|
-
return createHash('sha256')
|
|
19
|
-
.update(content as Buffer)
|
|
20
|
-
.digest('hex')
|
|
21
|
-
.slice(0, FILE_HASH_LENGTH);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/** Full-length SHA-256 hex; used only for the combined project hash. */
|
|
25
|
-
export function sha256Hex(content: string | Buffer): string {
|
|
26
|
-
return createHash('sha256')
|
|
27
|
-
.update(content as Buffer)
|
|
28
|
-
.digest('hex');
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Deterministic project hash: full-length SHA-256 over the sorted list of
|
|
33
|
-
* per-file hashes joined by `|`. Matches `calculateProjectHash` in
|
|
34
|
-
* `packages/lua-cli/src/utils/backup-helpers.ts` byte-for-byte so cross-tool
|
|
35
|
-
* pushes do not produce spurious drift.
|
|
36
|
-
*/
|
|
37
|
-
export function combineFileHashes(files: { relativePath: string; hash: string }[]): string {
|
|
38
|
-
const sorted = [...files].sort((a, b) => a.relativePath.localeCompare(b.relativePath));
|
|
39
|
-
return sha256Hex(sorted.map((f) => f.hash).join('|'));
|
|
40
|
-
}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HTTP client for the `/developer/agents/:agentId/backup/*` endpoints on lua-api.
|
|
3
|
-
*
|
|
4
|
-
* Authentication is opaque to this module — the caller injects an
|
|
5
|
-
* `Authorization` header value. lua-cli uses a Bearer API key; server-side
|
|
6
|
-
* callers (`lua-claude-builder`) use a scoped service token.
|
|
7
|
-
*
|
|
8
|
-
* Errors surface as `BackupHttpError` instances with status code attached so
|
|
9
|
-
* the caller can distinguish auth (`401/403`) from transport vs CAS-conflict
|
|
10
|
-
* (`409`) failures.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import type {
|
|
14
|
-
BackupExistsResponse,
|
|
15
|
-
BackupManifest,
|
|
16
|
-
BackupMetadata,
|
|
17
|
-
CheckBlobsResponse,
|
|
18
|
-
GetBlobUrlsResponse,
|
|
19
|
-
SaveManifestRequest,
|
|
20
|
-
} from './types';
|
|
21
|
-
|
|
22
|
-
/** Minimal `fetch` contract — Node 18+, browser, or a test stub. */
|
|
23
|
-
export type FetchLike = typeof fetch;
|
|
24
|
-
|
|
25
|
-
export class BackupHttpError extends Error {
|
|
26
|
-
constructor(
|
|
27
|
-
message: string,
|
|
28
|
-
public readonly status: number,
|
|
29
|
-
public readonly endpoint: string,
|
|
30
|
-
public readonly body?: string
|
|
31
|
-
) {
|
|
32
|
-
super(message);
|
|
33
|
-
this.name = 'BackupHttpError';
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface BackupHttpClientOptions {
|
|
38
|
-
/** Base URL for lua-api (e.g. `https://api.heylua.ai`). No trailing slash. */
|
|
39
|
-
baseUrl: string;
|
|
40
|
-
/** Full `Authorization` header value, e.g. `Bearer <apiKey>`. */
|
|
41
|
-
authHeader: string;
|
|
42
|
-
/** Target agent id. Embedded into every path. */
|
|
43
|
-
agentId: string;
|
|
44
|
-
/** Override the global `fetch` (tests inject a mock). */
|
|
45
|
-
fetch?: FetchLike;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Thin wrapper around the backup endpoints. All methods return the parsed
|
|
50
|
-
* JSON body on `2xx` and throw `BackupHttpError` otherwise — by design this
|
|
51
|
-
* pushes branching (e.g. "no backup yet → 404") into the caller, where the
|
|
52
|
-
* intent is clearer than a discriminated success/error wrapper.
|
|
53
|
-
*/
|
|
54
|
-
export class BackupHttpClient {
|
|
55
|
-
private readonly fetchFn: FetchLike;
|
|
56
|
-
|
|
57
|
-
constructor(private readonly options: BackupHttpClientOptions) {
|
|
58
|
-
this.fetchFn = options.fetch ?? fetch;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
private url(path: string): string {
|
|
62
|
-
const base = this.options.baseUrl.replace(/\/$/, '');
|
|
63
|
-
return `${base}/developer/agents/${encodeURIComponent(this.options.agentId)}${path}`;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
private async json<T>(method: 'GET' | 'POST', path: string, body?: unknown): Promise<T> {
|
|
67
|
-
const endpoint = this.url(path);
|
|
68
|
-
const res = await this.fetchFn(endpoint, {
|
|
69
|
-
method,
|
|
70
|
-
headers: {
|
|
71
|
-
Authorization: this.options.authHeader,
|
|
72
|
-
...(body !== undefined ? { 'Content-Type': 'application/json' } : {}),
|
|
73
|
-
Accept: 'application/json',
|
|
74
|
-
},
|
|
75
|
-
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
76
|
-
});
|
|
77
|
-
if (!res.ok) {
|
|
78
|
-
let text: string | undefined;
|
|
79
|
-
try {
|
|
80
|
-
text = await res.text();
|
|
81
|
-
} catch {
|
|
82
|
-
text = undefined;
|
|
83
|
-
}
|
|
84
|
-
throw new BackupHttpError(
|
|
85
|
-
`Backup request failed: ${method} ${path} → ${res.status} ${res.statusText}`,
|
|
86
|
-
res.status,
|
|
87
|
-
endpoint,
|
|
88
|
-
text
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
// 204 / empty body is unusual here but tolerate it for the manifest save
|
|
92
|
-
// path where the server may decide to return only headers in the future.
|
|
93
|
-
const text = await res.text();
|
|
94
|
-
if (!text) return undefined as unknown as T;
|
|
95
|
-
return JSON.parse(text) as T;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/** `POST /backup/check-blobs` — returns existing vs missing partition. */
|
|
99
|
-
checkBlobsExist(hashes: string[]): Promise<CheckBlobsResponse> {
|
|
100
|
-
return this.json<CheckBlobsResponse>('POST', '/backup/check-blobs', { hashes });
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/** `POST /backup/blob-upload-urls` — presigned S3 PUT URLs. */
|
|
104
|
-
getBlobUploadUrls(hashes: string[]): Promise<GetBlobUrlsResponse> {
|
|
105
|
-
return this.json<GetBlobUrlsResponse>('POST', '/backup/blob-upload-urls', { hashes });
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/** `POST /backup/blob-urls` — presigned S3 GET URLs (for restore). */
|
|
109
|
-
getBlobUrls(hashes: string[]): Promise<GetBlobUrlsResponse> {
|
|
110
|
-
return this.json<GetBlobUrlsResponse>('POST', '/backup/blob-urls', { hashes });
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/** `POST /backup/manifest` — final step in a push; returns server metadata. */
|
|
114
|
-
saveManifest(data: SaveManifestRequest): Promise<BackupMetadata> {
|
|
115
|
-
return this.json<BackupMetadata>('POST', '/backup/manifest', data);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/** `GET /backup` — metadata only, no file list. */
|
|
119
|
-
getMetadata(): Promise<BackupMetadata> {
|
|
120
|
-
return this.json<BackupMetadata>('GET', '/backup');
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/** `GET /backup/manifest` — metadata + file list. */
|
|
124
|
-
getManifest(): Promise<BackupManifest> {
|
|
125
|
-
return this.json<BackupManifest>('GET', '/backup/manifest');
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/** `GET /backup/check/:hash` — fast freshness probe. */
|
|
129
|
-
checkBackupExists(hash: string): Promise<BackupExistsResponse> {
|
|
130
|
-
return this.json<BackupExistsResponse>('GET', `/backup/check/${encodeURIComponent(hash)}`);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @lua/shared-source-sync — runtime-agnostic implementation of the agent
|
|
3
|
-
* project backup protocol used by lua-cli (`lua push backup` / `lua sync`)
|
|
4
|
-
* and lua-claude-builder (post-deploy source persist).
|
|
5
|
-
*
|
|
6
|
-
* The wire format and S3 layout are defined by the existing
|
|
7
|
-
* `/developer/agents/:agentId/backup/*` endpoints on lua-api. This package
|
|
8
|
-
* is the single source of truth for how to drive them so the CLI and any
|
|
9
|
-
* server-side caller cannot drift apart.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
export type {
|
|
13
|
-
BackupFileRef,
|
|
14
|
-
BackupManifest,
|
|
15
|
-
BackupMetadata,
|
|
16
|
-
BackupExistsResponse,
|
|
17
|
-
CheckBlobsRequest,
|
|
18
|
-
CheckBlobsResponse,
|
|
19
|
-
GetBlobUrlsRequest,
|
|
20
|
-
GetBlobUrlsResponse,
|
|
21
|
-
SaveManifestRequest,
|
|
22
|
-
} from './types';
|
|
23
|
-
|
|
24
|
-
export { FILE_HASH_LENGTH, hashContentTruncated, sha256Hex, combineFileHashes } from './hash';
|
|
25
|
-
|
|
26
|
-
export { shouldSkipFile, shouldSkipDirectory, classifyFile, DEFAULT_MAX_FILE_BYTES } from './filter';
|
|
27
|
-
|
|
28
|
-
export { walkWorkspace, type WalkOptions, type WalkResult } from './walk';
|
|
29
|
-
|
|
30
|
-
export { BackupHttpClient, BackupHttpError, type BackupHttpClientOptions, type FetchLike } from './http';
|
|
31
|
-
|
|
32
|
-
export { uploadBlobs, downloadBlobs } from './transfer';
|
|
33
|
-
|
|
34
|
-
export { resolveBackupFileTarget, restoreFromBlobs, type RestoreOptions, type RestoreResult } from './restore';
|
|
35
|
-
|
|
36
|
-
export { pushAgentBackup, type PushAgentBackupOptions, type PushAgentBackupResult } from './push';
|
|
37
|
-
|
|
38
|
-
export { pullAgentBackup, type PullAgentBackupOptions, type PullAgentBackupResult } from './pull';
|
|
39
|
-
|
|
40
|
-
export {
|
|
41
|
-
ARCHIVE_SCHEMA_VERSION,
|
|
42
|
-
encodeWorkspaceArchive,
|
|
43
|
-
decodeWorkspaceArchive,
|
|
44
|
-
writeArchiveToWorkspace,
|
|
45
|
-
} from './archive';
|
|
46
|
-
|
|
47
|
-
export type {
|
|
48
|
-
SkillSourceTool,
|
|
49
|
-
FetchedSkillSource,
|
|
50
|
-
AttachSkillSourceTool,
|
|
51
|
-
AttachSkillSourcePayload,
|
|
52
|
-
AttachSkillSourceResponse,
|
|
53
|
-
SkillSourceEditor,
|
|
54
|
-
} from './skill-source';
|
|
55
|
-
|
|
56
|
-
export { SKILL_SOURCE_EDITORS } from './skill-source';
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* High-level "pull the per-agent backup into `targetDir`".
|
|
3
|
-
*
|
|
4
|
-
* Counterpart to `pushAgentBackup`. Today only the CLI calls this; the
|
|
5
|
-
* shared package exposes it so future server-side features (e.g. "rehydrate
|
|
6
|
-
* Builder workspace from the latest CLI push") can reuse the same logic.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { BackupHttpClient, type BackupHttpClientOptions } from './http';
|
|
10
|
-
import { downloadBlobs } from './transfer';
|
|
11
|
-
import { restoreFromBlobs, type RestoreOptions, type RestoreResult } from './restore';
|
|
12
|
-
import type { BackupManifest } from './types';
|
|
13
|
-
|
|
14
|
-
export interface PullAgentBackupOptions {
|
|
15
|
-
http: BackupHttpClientOptions;
|
|
16
|
-
/** Destination on disk. Will be created if necessary. */
|
|
17
|
-
targetDir: string;
|
|
18
|
-
/** Restore options (overwrite policy). */
|
|
19
|
-
restore?: RestoreOptions;
|
|
20
|
-
/** Tuning knob for the parallel S3 GETs. */
|
|
21
|
-
concurrency?: number;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface PullAgentBackupResult extends RestoreResult {
|
|
25
|
-
manifest: BackupManifest;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Fetch the manifest, download every referenced blob, write to disk. Returns
|
|
30
|
-
* the manifest plus a tally of write/no-op/skip outcomes.
|
|
31
|
-
*
|
|
32
|
-
* Errors propagate — a missing backup throws `BackupHttpError` (404). Callers
|
|
33
|
-
* decide whether that warrants a friendly "no source yet" message or a hard
|
|
34
|
-
* failure.
|
|
35
|
-
*/
|
|
36
|
-
export async function pullAgentBackup(opts: PullAgentBackupOptions): Promise<PullAgentBackupResult> {
|
|
37
|
-
const client = new BackupHttpClient(opts.http);
|
|
38
|
-
const manifest = await client.getManifest();
|
|
39
|
-
const uniqueHashes = [...new Set(manifest.files.map((f) => f.hash))];
|
|
40
|
-
|
|
41
|
-
const blobs = uniqueHashes.length
|
|
42
|
-
? await (async () => {
|
|
43
|
-
const urls = await client.getBlobUrls(uniqueHashes);
|
|
44
|
-
return downloadBlobs({ urls: urls.urls, fetch: opts.http.fetch, concurrency: opts.concurrency });
|
|
45
|
-
})()
|
|
46
|
-
: new Map<string, Buffer>();
|
|
47
|
-
|
|
48
|
-
const result = restoreFromBlobs(manifest, blobs, opts.targetDir, opts.restore);
|
|
49
|
-
return { ...result, manifest };
|
|
50
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* High-level "push the contents of `workspaceDir` to the per-agent backup".
|
|
3
|
-
*
|
|
4
|
-
* This is the algorithm shared between `lua-cli`'s `lua push backup` and the
|
|
5
|
-
* `lua-claude-builder` `SourceSyncService`. Pure (no console output, no
|
|
6
|
-
* filesystem mutation outside of reading `workspaceDir`, no telemetry — the
|
|
7
|
-
* caller layers those concerns on top).
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { BackupHttpClient, type BackupHttpClientOptions } from './http';
|
|
11
|
-
import { uploadBlobs } from './transfer';
|
|
12
|
-
import { walkWorkspace, type WalkOptions } from './walk';
|
|
13
|
-
import type { BackupFileRef, BackupMetadata } from './types';
|
|
14
|
-
|
|
15
|
-
export interface PushAgentBackupOptions {
|
|
16
|
-
/** HTTP client config — the helper constructs the client internally. */
|
|
17
|
-
http: BackupHttpClientOptions;
|
|
18
|
-
/** Workspace root. Walked recursively with the standard skip rules. */
|
|
19
|
-
workspaceDir: string;
|
|
20
|
-
/** Org id (forwarded to the saveManifest body so the server can skip a lookup). */
|
|
21
|
-
orgId: string;
|
|
22
|
-
/** Semver of the deployed primitive when known. */
|
|
23
|
-
version?: string;
|
|
24
|
-
/** Audit label, e.g. `'admin-tool-builder'` or `'manual lua push backup'`. */
|
|
25
|
-
triggeredBy?: string;
|
|
26
|
-
/** Provenance label for the manifest record. Defaults to `'cli'` to match historical behavior. */
|
|
27
|
-
createdBy?: string;
|
|
28
|
-
/** Tuning knobs for the walk. */
|
|
29
|
-
walkOptions?: WalkOptions;
|
|
30
|
-
/** Tuning knob for the parallel S3 PUTs. */
|
|
31
|
-
concurrency?: number;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface PushAgentBackupResult {
|
|
35
|
-
/** Combined project hash that was pushed. */
|
|
36
|
-
projectHash: string;
|
|
37
|
-
/** Number of files described by the manifest (post-dedupe by path). */
|
|
38
|
-
fileCount: number;
|
|
39
|
-
/** Number of blobs the helper actually PUT to S3 (deduped against existing). */
|
|
40
|
-
filesUploaded: number;
|
|
41
|
-
/** Server-assigned monotonic version, when the V2 manifest path returned one. */
|
|
42
|
-
activeVersion?: number;
|
|
43
|
-
/** Full server metadata response for the saveManifest call. */
|
|
44
|
-
metadata: BackupMetadata;
|
|
45
|
-
/** The manifest file refs in the order they were sent. */
|
|
46
|
-
files: BackupFileRef[];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Walk the workspace, upload missing blobs, save the manifest, return the
|
|
51
|
-
* server's response. Throws on any non-2xx — callers decide how to react.
|
|
52
|
-
*
|
|
53
|
-
* Idempotent by design: the algorithm is content-addressed, so re-running the
|
|
54
|
-
* push for the same workspace state is a no-op aside from the manifest write
|
|
55
|
-
* (which the server treats as either equal-to-current or a new version).
|
|
56
|
-
*/
|
|
57
|
-
export async function pushAgentBackup(opts: PushAgentBackupOptions): Promise<PushAgentBackupResult> {
|
|
58
|
-
const snapshot = walkWorkspace(opts.workspaceDir, opts.walkOptions);
|
|
59
|
-
const client = new BackupHttpClient(opts.http);
|
|
60
|
-
|
|
61
|
-
const uniqueHashes = [...new Set(snapshot.files.map((f) => f.hash))];
|
|
62
|
-
let filesUploaded = 0;
|
|
63
|
-
|
|
64
|
-
if (uniqueHashes.length > 0) {
|
|
65
|
-
const checked = await client.checkBlobsExist(uniqueHashes);
|
|
66
|
-
if (checked.missing.length > 0) {
|
|
67
|
-
const urls = await client.getBlobUploadUrls(checked.missing);
|
|
68
|
-
filesUploaded = await uploadBlobs({
|
|
69
|
-
uploadUrls: urls.urls,
|
|
70
|
-
contentByHash: snapshot.contentByHash,
|
|
71
|
-
fetch: opts.http.fetch,
|
|
72
|
-
concurrency: opts.concurrency,
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const metadata = await client.saveManifest({
|
|
78
|
-
projectHash: snapshot.projectHash,
|
|
79
|
-
files: snapshot.files,
|
|
80
|
-
version: opts.version,
|
|
81
|
-
orgId: opts.orgId,
|
|
82
|
-
createdBy: opts.createdBy ?? 'cli',
|
|
83
|
-
triggeredBy: opts.triggeredBy,
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
return {
|
|
87
|
-
projectHash: snapshot.projectHash,
|
|
88
|
-
fileCount: snapshot.files.length,
|
|
89
|
-
filesUploaded,
|
|
90
|
-
activeVersion: metadata.activeVersion,
|
|
91
|
-
metadata,
|
|
92
|
-
files: snapshot.files,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Restore primitives: write a downloaded blob map back to disk.
|
|
3
|
-
*
|
|
4
|
-
* Mirrors `restoreProjectFromBackup` + `resolveBackupFileTarget` in
|
|
5
|
-
* `packages/lua-cli/src/utils/backup-helpers.ts`. The sandbox rule for
|
|
6
|
-
* `external: true` entries is preserved: they land under
|
|
7
|
-
* `<targetDir>/.lua/external/<workspaceRelativePath>` rather than being
|
|
8
|
-
* written back to their original workspace location.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'fs';
|
|
12
|
-
import { dirname, join, resolve, sep } from 'path';
|
|
13
|
-
import type { BackupFileRef, BackupManifest } from './types';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Compute the disk path where a manifest entry should land during restore.
|
|
17
|
-
*
|
|
18
|
-
* Throws if the result would escape `targetDir` — a malicious manifest with
|
|
19
|
-
* `../` segments must not be allowed to overwrite arbitrary files.
|
|
20
|
-
*/
|
|
21
|
-
export function resolveBackupFileTarget(file: BackupFileRef, targetDir: string): string {
|
|
22
|
-
const base = resolve(targetDir);
|
|
23
|
-
const sandboxed = file.external ? join(base, '.lua', 'external', file.relativePath) : join(base, file.relativePath);
|
|
24
|
-
const resolved = resolve(sandboxed);
|
|
25
|
-
if (resolved !== base && !resolved.startsWith(base + sep)) {
|
|
26
|
-
throw new Error(`Backup entry escapes target directory: ${file.relativePath}`);
|
|
27
|
-
}
|
|
28
|
-
return resolved;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface RestoreOptions {
|
|
32
|
-
/** Overwrite existing files. Defaults to `false` — collision-safe. */
|
|
33
|
-
overwrite?: boolean;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface RestoreResult {
|
|
37
|
-
filesWritten: number;
|
|
38
|
-
filesUnchanged: number;
|
|
39
|
-
filesSkipped: number;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Materialize a manifest's files into `targetDir`. Skips writes when the
|
|
44
|
-
* on-disk bytes already match the blob (so callers can distinguish "9 files
|
|
45
|
-
* restored" from "9 files matched, 0 written") and respects `overwrite=false`
|
|
46
|
-
* to avoid clobbering edits the user hasn't yet pushed.
|
|
47
|
-
*/
|
|
48
|
-
export function restoreFromBlobs(
|
|
49
|
-
manifest: BackupManifest,
|
|
50
|
-
blobs: Map<string, Buffer>,
|
|
51
|
-
targetDir: string,
|
|
52
|
-
opts: RestoreOptions = {}
|
|
53
|
-
): RestoreResult {
|
|
54
|
-
let filesWritten = 0;
|
|
55
|
-
let filesUnchanged = 0;
|
|
56
|
-
let filesSkipped = 0;
|
|
57
|
-
|
|
58
|
-
for (const file of manifest.files) {
|
|
59
|
-
const content = blobs.get(file.hash);
|
|
60
|
-
if (!content) {
|
|
61
|
-
throw new Error(`Blob not found for hash: ${file.hash} (${file.relativePath})`);
|
|
62
|
-
}
|
|
63
|
-
const targetPath = resolveBackupFileTarget(file, targetDir);
|
|
64
|
-
|
|
65
|
-
if (existsSync(targetPath)) {
|
|
66
|
-
const sameSize = statSync(targetPath).size === content.length;
|
|
67
|
-
if (sameSize && readFileSync(targetPath).equals(content)) {
|
|
68
|
-
filesUnchanged++;
|
|
69
|
-
continue;
|
|
70
|
-
}
|
|
71
|
-
if (!opts.overwrite) {
|
|
72
|
-
filesSkipped++;
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
mkdirSync(dirname(targetPath), { recursive: true });
|
|
78
|
-
writeFileSync(targetPath, content);
|
|
79
|
-
filesWritten++;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return { filesWritten, filesUnchanged, filesSkipped };
|
|
83
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wire types for the per-skill canonical source store.
|
|
3
|
-
* Spec: docs/superpowers/specs/2026-05-02-canonical-tool-source-design.md.
|
|
4
|
-
*
|
|
5
|
-
* Driven by both the admin-tool-builder's CanonicalSourceClient (internal
|
|
6
|
-
* lua-agents URI, no auth) and lua-cli's SkillApi (developer-facing lua-api
|
|
7
|
-
* endpoint, Bearer auth). Transport differs; the wire shapes are shared.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export const SKILL_SOURCE_EDITORS = ['builder', 'cli', 'engineer', 'system'] as const;
|
|
11
|
-
export type SkillSourceEditor = (typeof SKILL_SOURCE_EDITORS)[number];
|
|
12
|
-
|
|
13
|
-
/** Per-tool entry returned by `GET /skills/.../source`. */
|
|
14
|
-
export interface SkillSourceTool {
|
|
15
|
-
name: string;
|
|
16
|
-
entryFile: string | null;
|
|
17
|
-
source: string | null;
|
|
18
|
-
lastEditedBy: SkillSourceEditor | null;
|
|
19
|
-
lastEditedAt: string | Date | null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** Response from `GET /skills/.../source` (lua-agents internal) / `GET /developer/skills/.../source` (lua-api). */
|
|
23
|
-
export interface FetchedSkillSource {
|
|
24
|
-
skillId: string;
|
|
25
|
-
version: string;
|
|
26
|
-
sourceArchive: string | null;
|
|
27
|
-
archiveSchemaVersion: number | null;
|
|
28
|
-
tools: SkillSourceTool[];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/** Per-tool entry accepted by `PUT /skills/.../version/.../source`. */
|
|
32
|
-
export interface AttachSkillSourceTool {
|
|
33
|
-
name: string;
|
|
34
|
-
source?: string;
|
|
35
|
-
entryFile?: string;
|
|
36
|
-
lastEditedBy?: SkillSourceEditor;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/** Body of `PUT /skills/.../version/.../source`. */
|
|
40
|
-
export interface AttachSkillSourcePayload {
|
|
41
|
-
sourceArchive?: string;
|
|
42
|
-
archiveSchemaVersion?: number;
|
|
43
|
-
tools?: AttachSkillSourceTool[];
|
|
44
|
-
/**
|
|
45
|
-
* CAS gate: if supplied and not matching the skill's current
|
|
46
|
-
* `activeVersionId` on the server, the write is rejected with 409.
|
|
47
|
-
*/
|
|
48
|
-
expectedActiveVersionId?: string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/** Successful response shape from `PUT /skills/.../version/.../source`. */
|
|
52
|
-
export interface AttachSkillSourceResponse {
|
|
53
|
-
ok: true;
|
|
54
|
-
version: string;
|
|
55
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* S3 transfer primitives: gzip-compressed blob upload and download.
|
|
3
|
-
*
|
|
4
|
-
* Content is always gzipped before upload (matches the CLI convention) and
|
|
5
|
-
* decompressed transparently on download (magic-byte sniff with raw fallback
|
|
6
|
-
* for legacy/uncompressed blobs that may still exist).
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { gunzipSync, gzipSync } from 'zlib';
|
|
10
|
-
import type { FetchLike } from './http';
|
|
11
|
-
|
|
12
|
-
const DEFAULT_CONCURRENCY = 10;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* PUT each blob to its presigned URL. Caller supplies a map of `hash → URL`
|
|
16
|
-
* (from `BackupHttpClient.getBlobUploadUrls`) plus a map of `hash → content`.
|
|
17
|
-
* Returns the count of blobs that landed in S3.
|
|
18
|
-
*/
|
|
19
|
-
export async function uploadBlobs(opts: {
|
|
20
|
-
uploadUrls: Record<string, string>;
|
|
21
|
-
contentByHash: Map<string, Buffer>;
|
|
22
|
-
fetch?: FetchLike;
|
|
23
|
-
concurrency?: number;
|
|
24
|
-
}): Promise<number> {
|
|
25
|
-
const fetchFn = opts.fetch ?? fetch;
|
|
26
|
-
const concurrency = opts.concurrency ?? DEFAULT_CONCURRENCY;
|
|
27
|
-
const hashes = Object.keys(opts.uploadUrls);
|
|
28
|
-
|
|
29
|
-
for (let i = 0; i < hashes.length; i += concurrency) {
|
|
30
|
-
const batch = hashes.slice(i, i + concurrency);
|
|
31
|
-
await Promise.all(
|
|
32
|
-
batch.map(async (hash) => {
|
|
33
|
-
const buf = opts.contentByHash.get(hash);
|
|
34
|
-
if (!buf) {
|
|
35
|
-
throw new Error(`uploadBlobs: no content for hash ${hash.slice(0, 12)}…`);
|
|
36
|
-
}
|
|
37
|
-
const compressed = gzipSync(buf);
|
|
38
|
-
const res = await fetchFn(opts.uploadUrls[hash], {
|
|
39
|
-
method: 'PUT',
|
|
40
|
-
body: compressed,
|
|
41
|
-
headers: { 'Content-Type': 'application/octet-stream' },
|
|
42
|
-
});
|
|
43
|
-
if (!res.ok) {
|
|
44
|
-
throw new Error(`S3 upload failed for ${hash.slice(0, 12)}…: ${res.status} ${res.statusText}`);
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
return hashes.length;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* GET each blob from its presigned URL and return `hash → buffer`. Detects
|
|
54
|
-
* gzip via magic bytes (1f 8b) and gracefully falls back to the raw response
|
|
55
|
-
* body for any legacy uncompressed blobs.
|
|
56
|
-
*/
|
|
57
|
-
export async function downloadBlobs(opts: {
|
|
58
|
-
urls: Record<string, string>;
|
|
59
|
-
fetch?: FetchLike;
|
|
60
|
-
concurrency?: number;
|
|
61
|
-
}): Promise<Map<string, Buffer>> {
|
|
62
|
-
const fetchFn = opts.fetch ?? fetch;
|
|
63
|
-
const concurrency = opts.concurrency ?? DEFAULT_CONCURRENCY;
|
|
64
|
-
const out = new Map<string, Buffer>();
|
|
65
|
-
const entries = Object.entries(opts.urls);
|
|
66
|
-
|
|
67
|
-
for (let i = 0; i < entries.length; i += concurrency) {
|
|
68
|
-
const batch = entries.slice(i, i + concurrency);
|
|
69
|
-
const downloaded = await Promise.all(
|
|
70
|
-
batch.map(async ([hash, url]) => {
|
|
71
|
-
const res = await fetchFn(url);
|
|
72
|
-
if (!res.ok) {
|
|
73
|
-
throw new Error(`S3 download failed for ${hash.slice(0, 12)}…: ${res.status} ${res.statusText}`);
|
|
74
|
-
}
|
|
75
|
-
const ab = await res.arrayBuffer();
|
|
76
|
-
const buf = Buffer.from(ab);
|
|
77
|
-
if (buf.length >= 2 && buf[0] === 0x1f && buf[1] === 0x8b) {
|
|
78
|
-
try {
|
|
79
|
-
return [hash, gunzipSync(buf)] as const;
|
|
80
|
-
} catch {
|
|
81
|
-
// Looked gzipped but wasn't — fall through to the raw bytes
|
|
82
|
-
// rather than failing the whole restore.
|
|
83
|
-
return [hash, buf] as const;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return [hash, buf] as const;
|
|
87
|
-
})
|
|
88
|
-
);
|
|
89
|
-
for (const [hash, buf] of downloaded) out.set(hash, buf);
|
|
90
|
-
}
|
|
91
|
-
return out;
|
|
92
|
-
}
|