lua-cli 3.5.0-alpha.3 → 3.5.0-beta.1
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/README.md +137 -689
- package/dist/api/agent.api.service.d.ts +1 -8
- package/dist/api/agent.api.service.js +1 -11
- package/dist/api/agent.api.service.js.map +1 -1
- package/dist/api/auth.api.service.d.ts +1 -1
- package/dist/api/auth.api.service.js +1 -1
- package/dist/api/auth.api.service.js.map +1 -1
- package/dist/api/backup.api.service.d.ts +80 -0
- package/dist/api/backup.api.service.js +101 -0
- package/dist/api/backup.api.service.js.map +1 -0
- package/dist/api/basket.api.service.d.ts +4 -5
- package/dist/api/basket.api.service.js +13 -18
- package/dist/api/basket.api.service.js.map +1 -1
- package/dist/api/cdn.api.service.d.ts +2 -0
- package/dist/api/cdn.api.service.js +2 -0
- package/dist/api/cdn.api.service.js.map +1 -1
- package/dist/api/chat.api.service.d.ts +10 -2
- package/dist/api/chat.api.service.js +21 -2
- package/dist/api/chat.api.service.js.map +1 -1
- package/dist/api/credentials.js +5 -8
- package/dist/api/credentials.js.map +1 -1
- package/dist/api/custom.data.api.service.d.ts +3 -3
- package/dist/api/custom.data.api.service.js +9 -10
- package/dist/api/custom.data.api.service.js.map +1 -1
- package/dist/api/developer.api.service.d.ts +1 -1
- package/dist/api/developer.api.service.js +1 -1
- package/dist/api/developer.api.service.js.map +1 -1
- package/dist/api/http.client.js.map +1 -0
- package/dist/api/job.api.service.d.ts +2 -2
- package/dist/api/job.api.service.js +2 -2
- package/dist/api/job.api.service.js.map +1 -1
- package/dist/api/logs.api.service.d.ts +1 -1
- package/dist/api/logs.api.service.js +1 -1
- package/dist/api/logs.api.service.js.map +1 -1
- package/dist/api/marketplace.api.service.d.ts +6 -6
- package/dist/api/marketplace.api.service.js.map +1 -1
- package/dist/api/order.api.service.d.ts +3 -4
- package/dist/api/order.api.service.js +8 -10
- package/dist/api/order.api.service.js.map +1 -1
- package/dist/api/persona.api.service.d.ts +1 -1
- package/dist/api/persona.api.service.js +1 -1
- package/dist/api/persona.api.service.js.map +1 -1
- package/dist/api/postprocessor.api.service.d.ts +1 -1
- package/dist/api/postprocessor.api.service.js +1 -1
- package/dist/api/postprocessor.api.service.js.map +1 -1
- package/dist/api/preprocessor.api.service.d.ts +1 -1
- package/dist/api/preprocessor.api.service.js +1 -1
- package/dist/api/preprocessor.api.service.js.map +1 -1
- package/dist/api/products.api.service.d.ts +4 -4
- package/dist/api/products.api.service.js +6 -6
- package/dist/api/products.api.service.js.map +1 -1
- package/dist/api/resource.api.service.d.ts +76 -0
- package/dist/api/resource.api.service.js +74 -0
- package/dist/api/resource.api.service.js.map +1 -0
- package/dist/api/skills.api.service.d.ts +7 -15
- package/dist/api/skills.api.service.js +1 -1
- package/dist/api/skills.api.service.js.map +1 -1
- package/dist/api/tool.api.service.d.ts +1 -1
- package/dist/api/tool.api.service.js +1 -1
- package/dist/api/tool.api.service.js.map +1 -1
- package/dist/api/unifiedto.api.service.d.ts +1 -1
- package/dist/api/unifiedto.api.service.js +1 -1
- package/dist/api/unifiedto.api.service.js.map +1 -1
- package/dist/api/user.data.api.service.d.ts +7 -8
- package/dist/api/user.data.api.service.js +2 -3
- package/dist/api/user.data.api.service.js.map +1 -1
- package/dist/api/webhook.api.service.d.ts +1 -1
- package/dist/api/webhook.api.service.js +1 -1
- package/dist/api/webhook.api.service.js.map +1 -1
- package/dist/api/whatsapp-templates.api.service.d.ts +1 -1
- package/dist/api/whatsapp-templates.api.service.js +1 -1
- package/dist/api/whatsapp-templates.api.service.js.map +1 -1
- package/dist/api-exports.d.ts +14 -12
- package/dist/api-exports.js +8 -8
- package/dist/api-exports.js.map +1 -1
- package/dist/cli/command-definitions.js +32 -17
- package/dist/cli/command-definitions.js.map +1 -1
- package/dist/commands/admin.js +3 -24
- package/dist/commands/admin.js.map +1 -1
- package/dist/commands/agents.d.ts +8 -7
- package/dist/commands/agents.js +63 -21
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/channels.js +11 -23
- package/dist/commands/channels.js.map +1 -1
- package/dist/commands/chat.js +33 -47
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/chatClear.js +11 -41
- package/dist/commands/chatClear.js.map +1 -1
- package/dist/commands/compile.d.ts +26 -23
- package/dist/commands/compile.js +98 -403
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/completion.js +1 -1
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/deploy.js +55 -25
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/dev.js +29 -45
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/env.js +12 -25
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/evals.js +3 -20
- package/dist/commands/evals.js.map +1 -1
- package/dist/commands/features.js +10 -23
- package/dist/commands/features.js.map +1 -1
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.js +1 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +135 -19
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/integrations.js +26 -37
- package/dist/commands/integrations.js.map +1 -1
- package/dist/commands/jobs.js +32 -56
- package/dist/commands/jobs.js.map +1 -1
- package/dist/commands/logs.js +9 -20
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/marketplace.js +34 -52
- package/dist/commands/marketplace.js.map +1 -1
- package/dist/commands/mcp.js +10 -23
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/persona.js +43 -74
- package/dist/commands/persona.js.map +1 -1
- package/dist/commands/postprocessors.js +15 -28
- package/dist/commands/postprocessors.js.map +1 -1
- package/dist/commands/preprocessors.js +15 -28
- package/dist/commands/preprocessors.js.map +1 -1
- package/dist/commands/production.js +30 -63
- package/dist/commands/production.js.map +1 -1
- package/dist/commands/push.js +294 -1241
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/pushBackup.d.ts +22 -0
- package/dist/commands/pushBackup.js +133 -0
- package/dist/commands/pushBackup.js.map +1 -0
- package/dist/commands/resources.js +29 -72
- package/dist/commands/resources.js.map +1 -1
- package/dist/commands/skills.d.ts +1 -1
- package/dist/commands/skills.js +58 -70
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/sync.d.ts +1 -3
- package/dist/commands/sync.js +12 -24
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/test.js +135 -104
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/webhooks.js +15 -28
- package/dist/commands/webhooks.js.map +1 -1
- package/dist/compiler/agent-traverser.d.ts +104 -0
- package/dist/compiler/agent-traverser.js +311 -0
- package/dist/compiler/agent-traverser.js.map +1 -0
- package/dist/compiler/bundler.d.ts +42 -0
- package/dist/compiler/bundler.js +187 -0
- package/dist/compiler/bundler.js.map +1 -0
- package/dist/compiler/compiler.d.ts +177 -0
- package/dist/compiler/compiler.js +580 -0
- package/dist/compiler/compiler.js.map +1 -0
- package/dist/compiler/index.d.ts +36 -0
- package/dist/compiler/index.js +42 -0
- package/dist/compiler/index.js.map +1 -0
- package/dist/compiler/plugins/base.d.ts +264 -0
- package/dist/compiler/plugins/base.js +307 -0
- package/dist/compiler/plugins/base.js.map +1 -0
- package/dist/compiler/plugins/job.plugin.d.ts +33 -0
- package/dist/compiler/plugins/job.plugin.js +143 -0
- package/dist/compiler/plugins/job.plugin.js.map +1 -0
- package/dist/compiler/plugins/mcp-server.plugin.d.ts +50 -0
- package/dist/compiler/plugins/mcp-server.plugin.js +186 -0
- package/dist/compiler/plugins/mcp-server.plugin.js.map +1 -0
- package/dist/compiler/plugins/postprocessor.plugin.d.ts +20 -0
- package/dist/compiler/plugins/postprocessor.plugin.js +39 -0
- package/dist/compiler/plugins/postprocessor.plugin.js.map +1 -0
- package/dist/compiler/plugins/preprocessor.plugin.d.ts +20 -0
- package/dist/compiler/plugins/preprocessor.plugin.js +48 -0
- package/dist/compiler/plugins/preprocessor.plugin.js.map +1 -0
- package/dist/compiler/plugins/processor-base.d.ts +16 -0
- package/dist/compiler/plugins/processor-base.js +34 -0
- package/dist/compiler/plugins/processor-base.js.map +1 -0
- package/dist/compiler/plugins/registry.d.ts +61 -0
- package/dist/compiler/plugins/registry.js +107 -0
- package/dist/compiler/plugins/registry.js.map +1 -0
- package/dist/compiler/plugins/skill.plugin.d.ts +71 -0
- package/dist/compiler/plugins/skill.plugin.js +243 -0
- package/dist/compiler/plugins/skill.plugin.js.map +1 -0
- package/dist/compiler/plugins/tool.plugin.d.ts +67 -0
- package/dist/compiler/plugins/tool.plugin.js +279 -0
- package/dist/compiler/plugins/tool.plugin.js.map +1 -0
- package/dist/compiler/plugins/webhook.plugin.d.ts +37 -0
- package/dist/compiler/plugins/webhook.plugin.js +127 -0
- package/dist/compiler/plugins/webhook.plugin.js.map +1 -0
- package/dist/compiler/source-writer.d.ts +98 -0
- package/dist/compiler/source-writer.js +223 -0
- package/dist/compiler/source-writer.js.map +1 -0
- package/dist/compiler/types.d.ts +289 -0
- package/dist/compiler/types.js +20 -0
- package/dist/compiler/types.js.map +1 -0
- package/dist/compiler/utils/ast-helpers.d.ts +57 -0
- package/dist/compiler/utils/ast-helpers.js +164 -0
- package/dist/compiler/utils/ast-helpers.js.map +1 -0
- package/dist/compiler/utils/common.d.ts +23 -0
- package/dist/compiler/utils/common.js +66 -0
- package/dist/compiler/utils/common.js.map +1 -0
- package/dist/compiler/utils/file-discovery.d.ts +34 -0
- package/dist/compiler/utils/file-discovery.js +68 -0
- package/dist/compiler/utils/file-discovery.js.map +1 -0
- package/dist/compiler/utils/path-resolver.d.ts +25 -0
- package/dist/compiler/utils/path-resolver.js +66 -0
- package/dist/compiler/utils/path-resolver.js.map +1 -0
- package/dist/compiler/utils/schema-converter.d.ts +26 -0
- package/dist/compiler/utils/schema-converter.js +94 -0
- package/dist/compiler/utils/schema-converter.js.map +1 -0
- package/dist/config/compile.constants.d.ts +2 -22
- package/dist/config/compile.constants.js +2 -49
- package/dist/config/compile.constants.js.map +1 -1
- package/dist/config/constants.d.ts +18 -2
- package/dist/config/constants.js +28 -8
- package/dist/config/constants.js.map +1 -1
- package/dist/config/dev.constants.d.ts +0 -10
- package/dist/config/dev.constants.js +0 -10
- package/dist/config/dev.constants.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/instances/basket.instance.js.map +1 -0
- package/dist/instances/data.entry.instance.js.map +1 -0
- package/dist/instances/job.instance.js.map +1 -0
- package/dist/instances/order.instance.js.map +1 -0
- package/dist/instances/product.instance.js.map +1 -0
- package/dist/instances/product.pagination.instance.js.map +1 -0
- package/dist/instances/product.search.instance.js.map +1 -0
- package/dist/instances/user.instance.js.map +1 -0
- package/dist/interfaces/admin.d.ts +0 -38
- package/dist/interfaces/backup.d.ts +125 -0
- package/dist/interfaces/backup.js +8 -0
- package/dist/interfaces/backup.js.map +1 -0
- package/dist/interfaces/baskets.d.ts +0 -56
- package/dist/interfaces/common.d.ts +1 -0
- package/dist/interfaces/deploy.d.ts +0 -15
- package/dist/interfaces/index.d.ts +1 -1
- package/dist/interfaces/marketplace.d.ts +51 -0
- package/dist/interfaces/marketplace.js +1 -1
- package/dist/interfaces/marketplace.js.map +1 -1
- package/dist/interfaces/message.d.ts +0 -3
- package/dist/interfaces/orders.d.ts +0 -24
- package/dist/interfaces/postprocessors.d.ts +0 -18
- package/dist/interfaces/preprocessors.d.ts +0 -18
- package/dist/interfaces/skills.d.ts +61 -0
- package/dist/interfaces/user.d.ts +25 -0
- package/dist/interfaces/webhooks.d.ts +0 -9
- package/dist/primitives/base.handler.d.ts +106 -0
- package/dist/primitives/base.handler.js +370 -0
- package/dist/primitives/base.handler.js.map +1 -0
- package/dist/primitives/index.d.ts +47 -0
- package/dist/primitives/index.js +78 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/primitives/job.handler.d.ts +52 -0
- package/dist/primitives/job.handler.js +118 -0
- package/dist/primitives/job.handler.js.map +1 -0
- package/dist/primitives/mcp-server.handler.d.ts +54 -0
- package/dist/primitives/mcp-server.handler.js +91 -0
- package/dist/primitives/mcp-server.handler.js.map +1 -0
- package/dist/primitives/postprocessor.handler.d.ts +49 -0
- package/dist/primitives/postprocessor.handler.js +81 -0
- package/dist/primitives/postprocessor.handler.js.map +1 -0
- package/dist/primitives/preprocessor.handler.d.ts +54 -0
- package/dist/primitives/preprocessor.handler.js +95 -0
- package/dist/primitives/preprocessor.handler.js.map +1 -0
- package/dist/primitives/skill.handler.d.ts +44 -0
- package/dist/primitives/skill.handler.js +192 -0
- package/dist/primitives/skill.handler.js.map +1 -0
- package/dist/primitives/types.d.ts +72 -0
- package/dist/primitives/types.js +17 -0
- package/dist/primitives/types.js.map +1 -0
- package/dist/primitives/webhook.handler.d.ts +50 -0
- package/dist/primitives/webhook.handler.js +96 -0
- package/dist/primitives/webhook.handler.js.map +1 -0
- package/dist/services/auth.js +1 -2
- package/dist/services/auth.js.map +1 -1
- package/dist/services/sandbox.service.d.ts +103 -0
- package/dist/services/sandbox.service.js +479 -0
- package/dist/services/sandbox.service.js.map +1 -0
- package/dist/types/api-contracts.d.ts +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/skill.d.ts +8 -2
- package/dist/types/skill.js +8 -0
- package/dist/types/skill.js.map +1 -1
- package/dist/types/yaml.types.d.ts +69 -0
- package/dist/types/yaml.types.js +6 -0
- package/dist/types/yaml.types.js.map +1 -0
- package/dist/utils/artifact-loader.d.ts +108 -0
- package/dist/utils/artifact-loader.js +188 -0
- package/dist/utils/artifact-loader.js.map +1 -0
- package/dist/utils/backup-helpers.d.ts +122 -0
- package/dist/utils/backup-helpers.js +274 -0
- package/dist/utils/backup-helpers.js.map +1 -0
- package/dist/utils/cli.d.ts +8 -0
- package/dist/utils/cli.js +19 -2
- package/dist/utils/cli.js.map +1 -1
- package/dist/utils/command-utils.d.ts +42 -0
- package/dist/utils/command-utils.js +83 -0
- package/dist/utils/command-utils.js.map +1 -0
- package/dist/utils/deploy-helpers.d.ts +0 -29
- package/dist/utils/deploy-helpers.js +0 -70
- package/dist/utils/deploy-helpers.js.map +1 -1
- package/dist/utils/dev-api.d.ts +3 -99
- package/dist/utils/dev-api.js +3 -430
- package/dist/utils/dev-api.js.map +1 -1
- package/dist/utils/dev-server.d.ts +3 -1
- package/dist/utils/dev-server.js +69 -145
- package/dist/utils/dev-server.js.map +1 -1
- package/dist/utils/dev-watcher.d.ts +0 -1
- package/dist/utils/dev-watcher.js +23 -8
- package/dist/utils/dev-watcher.js.map +1 -1
- package/dist/utils/env-loader.utils.d.ts +10 -1
- package/dist/utils/env-loader.utils.js +39 -31
- package/dist/utils/env-loader.utils.js.map +1 -1
- package/dist/utils/files.d.ts +47 -3
- package/dist/utils/files.js +98 -40
- package/dist/utils/files.js.map +1 -1
- package/dist/utils/init-agent.js +1 -2
- package/dist/utils/init-agent.js.map +1 -1
- package/dist/utils/init-helpers.d.ts +2 -10
- package/dist/utils/init-helpers.js +9 -17
- package/dist/utils/init-helpers.js.map +1 -1
- package/dist/utils/init-prompts.d.ts +0 -8
- package/dist/utils/init-prompts.js +0 -22
- package/dist/utils/init-prompts.js.map +1 -1
- package/dist/utils/prompt-handler.d.ts +3 -0
- package/dist/utils/prompt-handler.js +13 -0
- package/dist/utils/prompt-handler.js.map +1 -1
- package/dist/utils/sandbox-storage.d.ts +6 -5
- package/dist/utils/sandbox-storage.js +12 -12
- package/dist/utils/sandbox-storage.js.map +1 -1
- package/dist/utils/sandbox.d.ts +7 -30
- package/dist/utils/sandbox.js +247 -223
- package/dist/utils/sandbox.js.map +1 -1
- package/dist/utils/semver.d.ts +12 -0
- package/dist/utils/semver.js +23 -0
- package/dist/utils/semver.js.map +1 -1
- package/dist/utils/sync-display.d.ts +9 -0
- package/dist/utils/sync-display.js +67 -0
- package/dist/utils/sync-display.js.map +1 -0
- package/dist/utils/sync-fetch.d.ts +23 -0
- package/dist/utils/sync-fetch.js +64 -0
- package/dist/utils/sync-fetch.js.map +1 -0
- package/dist/utils/sync-helpers.d.ts +4 -59
- package/dist/utils/sync-helpers.js +4 -206
- package/dist/utils/sync-helpers.js.map +1 -1
- package/dist/web/app.css +912 -186
- package/dist/web/app.js +46 -46
- package/docs/API_INDEX.md +100 -0
- package/docs/API_REFERENCE.md +773 -0
- package/docs/CLI_REFERENCE.md +924 -0
- package/docs/GETTING_STARTED.md +862 -0
- package/docs/README.md +270 -0
- package/docs/api/AI.md +882 -0
- package/docs/api/Baskets.md +511 -0
- package/docs/api/CDN.md +524 -0
- package/docs/api/Data.md +446 -0
- package/docs/api/Jobs.md +524 -0
- package/docs/api/LuaAgent.md +454 -0
- package/docs/api/LuaJob.md +604 -0
- package/docs/api/LuaSkill.md +396 -0
- package/docs/api/LuaTool.md +521 -0
- package/docs/api/LuaWebhook.md +601 -0
- package/docs/api/Orders.md +514 -0
- package/docs/api/PostProcessor.md +565 -0
- package/docs/api/PreProcessor.md +630 -0
- package/docs/api/Products.md +507 -0
- package/docs/api/Templates.md +662 -0
- package/docs/api/User.md +567 -0
- package/docs/archive/DEVELOPMENT_GUIDE_V1.md +1294 -0
- package/docs/compiler-v2/ASSESSMENT.md +205 -0
- package/docs/compiler-v2/TEST_PLAN.md +306 -0
- package/package.json +3 -7
- package/template/tsconfig.json +1 -1
- package/dist/common/basket.instance.js.map +0 -1
- package/dist/common/data.entry.instance.js.map +0 -1
- package/dist/common/http.client.js.map +0 -1
- package/dist/common/job.instance.js.map +0 -1
- package/dist/common/order.instance.js.map +0 -1
- package/dist/common/product.instance.js.map +0 -1
- package/dist/common/product.pagination.instance.js.map +0 -1
- package/dist/common/product.search.instance.js.map +0 -1
- package/dist/common/user.instance.js.map +0 -1
- package/dist/config/auth.constants.d.ts +0 -11
- package/dist/config/auth.constants.js +0 -12
- package/dist/config/auth.constants.js.map +0 -1
- package/dist/config/init.constants.d.ts +0 -15
- package/dist/config/init.constants.js +0 -20
- package/dist/config/init.constants.js.map +0 -1
- package/dist/interfaces/compile.d.ts +0 -12
- package/dist/interfaces/compile.js +0 -5
- package/dist/interfaces/compile.js.map +0 -1
- package/dist/types/compile.types.d.ts +0 -131
- package/dist/types/compile.types.js +0 -6
- package/dist/types/compile.types.js.map +0 -1
- package/dist/utils/agent-code-utils.d.ts +0 -25
- package/dist/utils/agent-code-utils.js +0 -107
- package/dist/utils/agent-code-utils.js.map +0 -1
- package/dist/utils/bundling.d.ts +0 -89
- package/dist/utils/bundling.js +0 -1068
- package/dist/utils/bundling.js.map +0 -1
- package/dist/utils/compile.d.ts +0 -116
- package/dist/utils/compile.js +0 -1062
- package/dist/utils/compile.js.map +0 -1
- package/dist/utils/deploy-api.d.ts +0 -26
- package/dist/utils/deploy-api.js +0 -54
- package/dist/utils/deploy-api.js.map +0 -1
- package/dist/utils/deployment.d.ts +0 -26
- package/dist/utils/deployment.js +0 -218
- package/dist/utils/deployment.js.map +0 -1
- package/dist/utils/dev-helpers.d.ts +0 -47
- package/dist/utils/dev-helpers.js +0 -82
- package/dist/utils/dev-helpers.js.map +0 -1
- package/dist/utils/job-management.d.ts +0 -27
- package/dist/utils/job-management.js +0 -248
- package/dist/utils/job-management.js.map +0 -1
- package/dist/utils/mcp-server-management.d.ts +0 -26
- package/dist/utils/mcp-server-management.js +0 -197
- package/dist/utils/mcp-server-management.js.map +0 -1
- package/dist/utils/postprocessor-management.d.ts +0 -9
- package/dist/utils/postprocessor-management.js +0 -117
- package/dist/utils/postprocessor-management.js.map +0 -1
- package/dist/utils/pre-bundle-jobs.d.ts +0 -27
- package/dist/utils/pre-bundle-jobs.js +0 -189
- package/dist/utils/pre-bundle-jobs.js.map +0 -1
- package/dist/utils/preprocessor-management.d.ts +0 -9
- package/dist/utils/preprocessor-management.js +0 -117
- package/dist/utils/preprocessor-management.js.map +0 -1
- package/dist/utils/push-api.d.ts +0 -15
- package/dist/utils/push-api.js +0 -49
- package/dist/utils/push-api.js.map +0 -1
- package/dist/utils/push-helpers.d.ts +0 -82
- package/dist/utils/push-helpers.js +0 -246
- package/dist/utils/push-helpers.js.map +0 -1
- package/dist/utils/skill-management.d.ts +0 -39
- package/dist/utils/skill-management.js +0 -299
- package/dist/utils/skill-management.js.map +0 -1
- package/dist/utils/test-helpers.d.ts +0 -33
- package/dist/utils/test-helpers.js +0 -84
- package/dist/utils/test-helpers.js.map +0 -1
- package/dist/utils/test-prompts.d.ts +0 -23
- package/dist/utils/test-prompts.js +0 -187
- package/dist/utils/test-prompts.js.map +0 -1
- package/dist/utils/tool-detection.d.ts +0 -19
- package/dist/utils/tool-detection.js +0 -125
- package/dist/utils/tool-detection.js.map +0 -1
- package/dist/utils/webhook-management.d.ts +0 -27
- package/dist/utils/webhook-management.js +0 -241
- package/dist/utils/webhook-management.js.map +0 -1
- /package/dist/{common → api}/http.client.d.ts +0 -0
- /package/dist/{common → api}/http.client.js +0 -0
- /package/dist/{common → instances}/basket.instance.d.ts +0 -0
- /package/dist/{common → instances}/basket.instance.js +0 -0
- /package/dist/{common → instances}/data.entry.instance.d.ts +0 -0
- /package/dist/{common → instances}/data.entry.instance.js +0 -0
- /package/dist/{common → instances}/job.instance.d.ts +0 -0
- /package/dist/{common → instances}/job.instance.js +0 -0
- /package/dist/{common → instances}/order.instance.d.ts +0 -0
- /package/dist/{common → instances}/order.instance.js +0 -0
- /package/dist/{common → instances}/product.instance.d.ts +0 -0
- /package/dist/{common → instances}/product.instance.js +0 -0
- /package/dist/{common → instances}/product.pagination.instance.d.ts +0 -0
- /package/dist/{common → instances}/product.pagination.instance.js +0 -0
- /package/dist/{common → instances}/product.search.instance.d.ts +0 -0
- /package/dist/{common → instances}/product.search.instance.js +0 -0
- /package/dist/{common → instances}/user.instance.d.ts +0 -0
- /package/dist/{common → instances}/user.instance.js +0 -0
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test Command Helper Utilities
|
|
3
|
-
* Handles tool extraction, decompression, and schema processing
|
|
4
|
-
*/
|
|
5
|
-
import fs from "fs";
|
|
6
|
-
import path from "path";
|
|
7
|
-
import { gunzipSync } from "zlib";
|
|
8
|
-
import { Buffer } from "buffer";
|
|
9
|
-
/**
|
|
10
|
-
* Decompresses gzip-compressed base64 encoded code.
|
|
11
|
-
*
|
|
12
|
-
* @param compressedCode - Base64 encoded compressed code
|
|
13
|
-
* @returns Decompressed code string
|
|
14
|
-
*/
|
|
15
|
-
export function decompressCode(compressedCode) {
|
|
16
|
-
const buffer = Buffer.from(compressedCode, 'base64');
|
|
17
|
-
return gunzipSync(buffer).toString('utf8');
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Reads and parses deploy.json file.
|
|
21
|
-
*
|
|
22
|
-
* @returns Parsed deploy data
|
|
23
|
-
* @throws Error if deploy.json is not found
|
|
24
|
-
*/
|
|
25
|
-
export function readDeployJson() {
|
|
26
|
-
const luaDir = path.join(process.cwd(), ".lua");
|
|
27
|
-
if (!fs.existsSync(luaDir)) {
|
|
28
|
-
throw new Error(".lua directory not found. Run 'lua compile' first.");
|
|
29
|
-
}
|
|
30
|
-
const deployJsonPath = path.join(luaDir, "deploy.json");
|
|
31
|
-
if (!fs.existsSync(deployJsonPath)) {
|
|
32
|
-
throw new Error("deploy.json not found. Run 'lua compile' first.");
|
|
33
|
-
}
|
|
34
|
-
return JSON.parse(fs.readFileSync(deployJsonPath, "utf8"));
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Extracts all tools from deploy.json (handles both new and legacy formats).
|
|
38
|
-
*
|
|
39
|
-
* @param deployData - Parsed deploy.json data
|
|
40
|
-
* @returns Array of tools with their metadata
|
|
41
|
-
* @throws Error if no tools are found
|
|
42
|
-
*/
|
|
43
|
-
export function extractToolsFromDeployData(deployData) {
|
|
44
|
-
let allTools = [];
|
|
45
|
-
if (deployData.skills && Array.isArray(deployData.skills)) {
|
|
46
|
-
// New format: extract tools from skills array
|
|
47
|
-
deployData.skills.forEach((skill) => {
|
|
48
|
-
if (skill.tools && Array.isArray(skill.tools)) {
|
|
49
|
-
skill.tools.forEach((tool) => {
|
|
50
|
-
allTools.push({
|
|
51
|
-
...tool,
|
|
52
|
-
skillName: skill.name // Add skill context
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
else if (deployData.tools) {
|
|
59
|
-
// Legacy format: tools as object or array
|
|
60
|
-
if (Array.isArray(deployData.tools)) {
|
|
61
|
-
allTools = deployData.tools;
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
// Convert tools object to array
|
|
65
|
-
allTools = Object.entries(deployData.tools).map(([name, tool]) => ({
|
|
66
|
-
name,
|
|
67
|
-
...tool
|
|
68
|
-
}));
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
if (allTools.length === 0) {
|
|
72
|
-
throw new Error("No tools found in deploy.json");
|
|
73
|
-
}
|
|
74
|
-
return allTools;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Checks if .env file exists.
|
|
78
|
-
*
|
|
79
|
-
* @returns True if .env file exists
|
|
80
|
-
*/
|
|
81
|
-
export function hasEnvFile() {
|
|
82
|
-
return fs.existsSync(path.join(process.cwd(), '.env'));
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=test-helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-helpers.js","sourceRoot":"","sources":["../../src/utils/test-helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,cAAsB;IACnD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACrD,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC7C,CAAC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,KAAK,EAAE,CAAC;QAC5B,0CAA0C;QAC1C,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACpC,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,gCAAgC;YAChC,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAgB,EAAE,EAAE,CAAC,CAAC;gBAChF,IAAI;gBACJ,GAAG,IAAI;aACR,CAAC,CAAC,CAAC;QACN,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test Command Prompt Utilities
|
|
3
|
-
* Handles interactive prompts for tool selection and input collection
|
|
4
|
-
*/
|
|
5
|
-
import { ToolData, InputSchema } from '../interfaces/test.js';
|
|
6
|
-
/**
|
|
7
|
-
* Prompts user to select a tool from the list.
|
|
8
|
-
*
|
|
9
|
-
* @param tools - Array of available tools
|
|
10
|
-
* @returns Selected tool data
|
|
11
|
-
*/
|
|
12
|
-
export declare function promptToolSelection(tools: ToolData[]): Promise<ToolData>;
|
|
13
|
-
/**
|
|
14
|
-
* Recursively generates prompts for schema properties and collects input values.
|
|
15
|
-
* Handles nested objects and various property types.
|
|
16
|
-
*
|
|
17
|
-
* @param schema - Input schema to generate prompts from
|
|
18
|
-
* @param prefix - Prefix for nested property names
|
|
19
|
-
* @param required - Array of required property names
|
|
20
|
-
* @param rootSchema - Root schema for nested property lookups
|
|
21
|
-
* @returns Object containing collected input values
|
|
22
|
-
*/
|
|
23
|
-
export declare function generatePromptsForObject(schema: InputSchema, prefix?: string, required?: string[], rootSchema?: InputSchema): Promise<any>;
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test Command Prompt Utilities
|
|
3
|
-
* Handles interactive prompts for tool selection and input collection
|
|
4
|
-
*/
|
|
5
|
-
import inquirer from "inquirer";
|
|
6
|
-
import { writeProgress } from './cli.js';
|
|
7
|
-
/**
|
|
8
|
-
* Prompts user to select a tool from the list.
|
|
9
|
-
*
|
|
10
|
-
* @param tools - Array of available tools
|
|
11
|
-
* @returns Selected tool data
|
|
12
|
-
*/
|
|
13
|
-
export async function promptToolSelection(tools) {
|
|
14
|
-
const toolChoices = tools.map((tool) => ({
|
|
15
|
-
name: tool.skillName
|
|
16
|
-
? `${tool.name} (${tool.skillName}) - ${tool.description}`
|
|
17
|
-
: `${tool.name} - ${tool.description}`,
|
|
18
|
-
value: tool
|
|
19
|
-
}));
|
|
20
|
-
const { selectedTool } = await inquirer.prompt([
|
|
21
|
-
{
|
|
22
|
-
type: 'list',
|
|
23
|
-
name: 'selectedTool',
|
|
24
|
-
message: '🔧 Select a tool to test:',
|
|
25
|
-
choices: toolChoices,
|
|
26
|
-
pageSize: 10
|
|
27
|
-
}
|
|
28
|
-
]);
|
|
29
|
-
return selectedTool;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Recursively generates prompts for schema properties and collects input values.
|
|
33
|
-
* Handles nested objects and various property types.
|
|
34
|
-
*
|
|
35
|
-
* @param schema - Input schema to generate prompts from
|
|
36
|
-
* @param prefix - Prefix for nested property names
|
|
37
|
-
* @param required - Array of required property names
|
|
38
|
-
* @param rootSchema - Root schema for nested property lookups
|
|
39
|
-
* @returns Object containing collected input values
|
|
40
|
-
*/
|
|
41
|
-
export async function generatePromptsForObject(schema, prefix = '', required = [], rootSchema) {
|
|
42
|
-
const prompts = [];
|
|
43
|
-
const result = {};
|
|
44
|
-
const inputSchema = rootSchema || schema;
|
|
45
|
-
for (const [key, value] of Object.entries(schema.properties || {})) {
|
|
46
|
-
const property = value;
|
|
47
|
-
const fullKey = prefix ? `${prefix}.${key}` : key;
|
|
48
|
-
const isRequired = required.includes(key);
|
|
49
|
-
if (property.type === "object" && property.properties) {
|
|
50
|
-
// Handle nested object
|
|
51
|
-
writeProgress(`\n📋 Entering values for ${key}:`);
|
|
52
|
-
const nestedResult = await generatePromptsForObject(property, fullKey, property.required || [], inputSchema);
|
|
53
|
-
result[key] = nestedResult[key] || nestedResult;
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
// Handle primitive types
|
|
57
|
-
const prompt = createPromptForProperty(key, property, fullKey, isRequired);
|
|
58
|
-
prompts.push(prompt);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
if (prompts.length > 0) {
|
|
62
|
-
const answers = await inquirer.prompt(prompts);
|
|
63
|
-
processAnswers(answers, result, inputSchema, schema, required);
|
|
64
|
-
}
|
|
65
|
-
return result;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Creates an inquirer prompt for a schema property.
|
|
69
|
-
*
|
|
70
|
-
* @param key - Property name
|
|
71
|
-
* @param property - Property schema
|
|
72
|
-
* @param fullKey - Full property key including nested path
|
|
73
|
-
* @param isRequired - Whether the property is required
|
|
74
|
-
* @returns Inquirer prompt configuration
|
|
75
|
-
*/
|
|
76
|
-
function createPromptForProperty(key, property, fullKey, isRequired) {
|
|
77
|
-
let promptType = 'input';
|
|
78
|
-
let validate = undefined;
|
|
79
|
-
switch (property.type) {
|
|
80
|
-
case "string":
|
|
81
|
-
if (isRequired) {
|
|
82
|
-
validate = (input) => input.trim() !== "" || `${key} is required`;
|
|
83
|
-
}
|
|
84
|
-
break;
|
|
85
|
-
case "number":
|
|
86
|
-
promptType = 'number';
|
|
87
|
-
if (isRequired) {
|
|
88
|
-
validate = (input) => !isNaN(input) || `${key} must be a valid number`;
|
|
89
|
-
}
|
|
90
|
-
break;
|
|
91
|
-
case "boolean":
|
|
92
|
-
promptType = 'confirm';
|
|
93
|
-
break;
|
|
94
|
-
default:
|
|
95
|
-
if (isRequired) {
|
|
96
|
-
validate = (input) => input.trim() !== "" || `${key} is required`;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
return {
|
|
100
|
-
type: promptType,
|
|
101
|
-
name: fullKey,
|
|
102
|
-
message: `${key}${isRequired ? " (required)" : " (optional)"}:`,
|
|
103
|
-
validate: validate,
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Processes prompt answers and converts them to proper types.
|
|
108
|
-
* Handles nested structures and optional fields.
|
|
109
|
-
*
|
|
110
|
-
* @param answers - Raw answers from inquirer
|
|
111
|
-
* @param result - Result object to populate
|
|
112
|
-
* @param inputSchema - Root input schema
|
|
113
|
-
* @param schema - Current schema level
|
|
114
|
-
* @param required - Required property names at current level
|
|
115
|
-
*/
|
|
116
|
-
function processAnswers(answers, result, inputSchema, schema, required) {
|
|
117
|
-
for (const [key, value] of Object.entries(answers)) {
|
|
118
|
-
const keyParts = key.split('.');
|
|
119
|
-
const propertyKey = keyParts[keyParts.length - 1];
|
|
120
|
-
// Navigate through nested schemas to find the property
|
|
121
|
-
let currentSchema = inputSchema;
|
|
122
|
-
let currentProperty = null;
|
|
123
|
-
for (let i = 0; i < keyParts.length; i++) {
|
|
124
|
-
const part = keyParts[i];
|
|
125
|
-
if (currentSchema.properties && currentSchema.properties[part]) {
|
|
126
|
-
currentProperty = currentSchema.properties[part];
|
|
127
|
-
if (i < keyParts.length - 1) {
|
|
128
|
-
currentSchema = currentProperty;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
if (currentProperty) {
|
|
133
|
-
const convertedValue = convertValueByType(value, currentProperty);
|
|
134
|
-
// Check if field is optional and value is empty - skip if so
|
|
135
|
-
const parentSchema = keyParts.length > 1 ? currentSchema : schema;
|
|
136
|
-
const isOptional = !parentSchema.required || !parentSchema.required.includes(propertyKey);
|
|
137
|
-
const isEmpty = convertedValue === '' || convertedValue === null || convertedValue === undefined;
|
|
138
|
-
if (isOptional && isEmpty) {
|
|
139
|
-
continue; // Skip optional empty fields
|
|
140
|
-
}
|
|
141
|
-
// Build nested structure
|
|
142
|
-
if (keyParts.length === 1) {
|
|
143
|
-
result[propertyKey] = convertedValue;
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
buildNestedStructure(result, keyParts, propertyKey, convertedValue);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Converts a value to the appropriate type based on schema property.
|
|
153
|
-
*
|
|
154
|
-
* @param value - Raw value from prompt
|
|
155
|
-
* @param property - Schema property definition
|
|
156
|
-
* @returns Converted value
|
|
157
|
-
*/
|
|
158
|
-
function convertValueByType(value, property) {
|
|
159
|
-
switch (property.type) {
|
|
160
|
-
case "number":
|
|
161
|
-
return parseFloat(value);
|
|
162
|
-
case "boolean":
|
|
163
|
-
return value;
|
|
164
|
-
default:
|
|
165
|
-
return value;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Builds nested object structure from key parts and value.
|
|
170
|
-
*
|
|
171
|
-
* @param result - Result object to populate
|
|
172
|
-
* @param keyParts - Array of nested key parts
|
|
173
|
-
* @param propertyKey - Final property key
|
|
174
|
-
* @param value - Value to set
|
|
175
|
-
*/
|
|
176
|
-
function buildNestedStructure(result, keyParts, propertyKey, value) {
|
|
177
|
-
let current = result;
|
|
178
|
-
for (let i = 0; i < keyParts.length - 1; i++) {
|
|
179
|
-
const part = keyParts[i];
|
|
180
|
-
if (!current[part]) {
|
|
181
|
-
current[part] = {};
|
|
182
|
-
}
|
|
183
|
-
current = current[part];
|
|
184
|
-
}
|
|
185
|
-
current[propertyKey] = value;
|
|
186
|
-
}
|
|
187
|
-
//# sourceMappingURL=test-prompts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-prompts.js","sourceRoot":"","sources":["../../src/utils/test-prompts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;GAKG;AAEH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,KAAiB;IACzD,MAAM,WAAW,GAAiB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAc,EAAE,EAAE,CAAC,CAAC;QAC/D,IAAI,EAAE,IAAI,CAAC,SAAS;YAClB,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,WAAW,EAAE;YAC1D,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,WAAW,EAAE;QACxC,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC,CAAC;IAEJ,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;QAC7C;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,2BAA2B;YACpC,OAAO,EAAE,WAAW;YACpB,QAAQ,EAAE,EAAE;SACb;KACF,CAAC,CAAC;IAEH,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,MAAmB,EACnB,SAAiB,EAAE,EACnB,WAAqB,EAAE,EACvB,UAAwB;IAExB,MAAM,OAAO,GAAU,EAAE,CAAC;IAC1B,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,MAAM,WAAW,GAAG,UAAU,IAAI,MAAM,CAAC;IAEzC,KAAK,MAAM,CAAC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AC;YACvC,CAAC;iBAAM,CAAC;gBACN,oBAAoB,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;YACtE,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAS,kBAAkB,CAAC,KAAU,EAAE,QAAwB;IAC9D,QAAQ,QAAQ,CAAC,IAAI,EAAE,CAAC;QACtB,KAAK,QAAQ;YACX,OAAO,UAAU,CAAC,KAAe,CAAC,CAAC;QACrC,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC;QACf;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,oBAAoB,CAC3B,MAAW,EACX,QAAkB,EAClB,WAAmB,EACnB,KAAU;IAEV,IAAI,OAAO,GAAG,MAAM,CAAC;IACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7C,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QACzB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACnB,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QACrB,CAAC;QACD,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;AAC/B,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tool Detection Utilities
|
|
3
|
-
* Handles detection and extraction of tools from TypeScript source code
|
|
4
|
-
*/
|
|
5
|
-
import { Project } from "ts-morph";
|
|
6
|
-
import { ToolInfo } from '../interfaces/compile.js';
|
|
7
|
-
import { TypeScriptSourceFile } from '../types/compile.types.js';
|
|
8
|
-
/**
|
|
9
|
-
* Detects all tools in the project by analyzing the index file and skill files.
|
|
10
|
-
* Searches for tools in two places:
|
|
11
|
-
* 1. LuaSkill constructor's tools array
|
|
12
|
-
* 2. skill.addTools() or skill.addTool() method calls
|
|
13
|
-
*
|
|
14
|
-
* @param indexFile - The main index TypeScript source file
|
|
15
|
-
* @param project - The ts-morph Project instance
|
|
16
|
-
* @param skillFilePaths - Optional array of skill file paths to scan for tools (for LuaAgent)
|
|
17
|
-
* @returns Promise resolving to array of detected tool information
|
|
18
|
-
*/
|
|
19
|
-
export declare function detectTools(indexFile: TypeScriptSourceFile, project: Project, skillFilePaths?: string[]): Promise<ToolInfo[]>;
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tool Detection Utilities
|
|
3
|
-
* Handles detection and extraction of tools from TypeScript source code
|
|
4
|
-
*/
|
|
5
|
-
import { Node } from "ts-morph";
|
|
6
|
-
import { extractToolFromNewExpressionSync, } from './compile.js';
|
|
7
|
-
/**
|
|
8
|
-
* Detects all tools in the project by analyzing the index file and skill files.
|
|
9
|
-
* Searches for tools in two places:
|
|
10
|
-
* 1. LuaSkill constructor's tools array
|
|
11
|
-
* 2. skill.addTools() or skill.addTool() method calls
|
|
12
|
-
*
|
|
13
|
-
* @param indexFile - The main index TypeScript source file
|
|
14
|
-
* @param project - The ts-morph Project instance
|
|
15
|
-
* @param skillFilePaths - Optional array of skill file paths to scan for tools (for LuaAgent)
|
|
16
|
-
* @returns Promise resolving to array of detected tool information
|
|
17
|
-
*/
|
|
18
|
-
export async function detectTools(indexFile, project, skillFilePaths) {
|
|
19
|
-
const tools = [];
|
|
20
|
-
// Search strategy 1: Find tools in LuaSkill constructor's tools array in index file
|
|
21
|
-
detectToolsFromConstructor(indexFile, project, tools);
|
|
22
|
-
// Search strategy 2: Find tools from skill.addTools() or skill.addTool() method calls in index file
|
|
23
|
-
detectToolsFromMethodCalls(indexFile, project, tools);
|
|
24
|
-
// Search strategy 3: If skill files are provided (from LuaAgent), scan those too
|
|
25
|
-
if (skillFilePaths && skillFilePaths.length > 0) {
|
|
26
|
-
for (const skillFilePath of skillFilePaths) {
|
|
27
|
-
try {
|
|
28
|
-
const skillFile = project.addSourceFileAtPath(skillFilePath);
|
|
29
|
-
detectToolsFromConstructor(skillFile, project, tools);
|
|
30
|
-
detectToolsFromMethodCalls(skillFile, project, tools);
|
|
31
|
-
}
|
|
32
|
-
catch (error) {
|
|
33
|
-
console.warn(`Warning: Could not scan skill file ${skillFilePath} for tools:`, error);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return tools;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Detects tools from LuaSkill constructor configuration.
|
|
41
|
-
* Example: new LuaSkill({ tools: [new MyTool(), ...] })
|
|
42
|
-
*
|
|
43
|
-
* @param indexFile - The TypeScript source file to analyze
|
|
44
|
-
* @param project - The ts-morph Project instance
|
|
45
|
-
* @param tools - Array to push detected tools into (mutated)
|
|
46
|
-
*/
|
|
47
|
-
function detectToolsFromConstructor(indexFile, project, tools) {
|
|
48
|
-
indexFile.forEachDescendant((node) => {
|
|
49
|
-
if (Node.isNewExpression(node)) {
|
|
50
|
-
const expression = node.getExpression();
|
|
51
|
-
if (expression.getText() === 'LuaSkill') {
|
|
52
|
-
const args = node.getArguments();
|
|
53
|
-
if (args.length > 0 && Node.isObjectLiteralExpression(args[0])) {
|
|
54
|
-
const configObj = args[0];
|
|
55
|
-
// Look for tools property in constructor config
|
|
56
|
-
configObj.getProperties().forEach((prop) => {
|
|
57
|
-
if (Node.isPropertyAssignment(prop) && prop.getName() === 'tools') {
|
|
58
|
-
const value = prop.getInitializer();
|
|
59
|
-
if (value && Node.isArrayLiteralExpression(value)) {
|
|
60
|
-
const toolsArray = value;
|
|
61
|
-
toolsArray.getElements().forEach((element) => {
|
|
62
|
-
if (Node.isNewExpression(element)) {
|
|
63
|
-
const toolInfo = extractToolFromNewExpressionSync(element, project);
|
|
64
|
-
if (toolInfo) {
|
|
65
|
-
tools.push(toolInfo);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Detects tools from skill.addTools() or skill.addTool() method calls.
|
|
79
|
-
* Examples:
|
|
80
|
-
* - skill.addTools([new Tool1(), new Tool2()])
|
|
81
|
-
* - skill.addTool(new MyTool())
|
|
82
|
-
*
|
|
83
|
-
* @param indexFile - The TypeScript source file to analyze
|
|
84
|
-
* @param project - The ts-morph Project instance
|
|
85
|
-
* @param tools - Array to push detected tools into (mutated)
|
|
86
|
-
*/
|
|
87
|
-
function detectToolsFromMethodCalls(indexFile, project, tools) {
|
|
88
|
-
indexFile.forEachDescendant((node) => {
|
|
89
|
-
if (Node.isCallExpression(node)) {
|
|
90
|
-
const expression = node.getExpression();
|
|
91
|
-
if (Node.isPropertyAccessExpression(expression)) {
|
|
92
|
-
const property = expression.getName();
|
|
93
|
-
if (property === 'addTools' || property === 'addTool') {
|
|
94
|
-
const args = node.getArguments();
|
|
95
|
-
if (property === 'addTools' && args.length > 0) {
|
|
96
|
-
// Handle skill.addTools([...]) - array of tools
|
|
97
|
-
const arrayArg = args[0];
|
|
98
|
-
if (Node.isArrayLiteralExpression(arrayArg)) {
|
|
99
|
-
const elements = arrayArg.getElements();
|
|
100
|
-
for (const element of elements) {
|
|
101
|
-
if (Node.isNewExpression(element)) {
|
|
102
|
-
const toolInfo = extractToolFromNewExpressionSync(element, project);
|
|
103
|
-
if (toolInfo) {
|
|
104
|
-
tools.push(toolInfo);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
else if (property === 'addTool' && args.length > 0) {
|
|
111
|
-
// Handle skill.addTool(new ToolClass()) - single tool
|
|
112
|
-
const arg = args[0];
|
|
113
|
-
if (Node.isNewExpression(arg)) {
|
|
114
|
-
const toolInfo = extractToolFromNewExpressionSync(arg, project);
|
|
115
|
-
if (toolInfo) {
|
|
116
|
-
tools.push(toolInfo);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
//# sourceMappingURL=tool-detection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-detection.js","sourceRoot":"","sources":["../../src/utils/tool-detection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAW,IAAI,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,gCAAgC,GACjC,MAAM,cAAc,CAAC;AAGtB;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,SAA+B,EAC/B,OAAgB,EAChB,cAAyB;IAEzB,MAAM,KAAK,GAAe,EAAE,CAAC;IAE7B,oFAAoF;IACpF,0BAA0B,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAEtD,oGAAoG;IACpG,0BAA0B,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAEtD,iFAAiF;IACjF,IAAI,cAAc,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChD,KAAK,MAAM,aAAa,IAAI,cAAc,EAAE,CAAC;YAC3C,IAAI,CAAC;gBACH,MAAM,SAAS,GAAG,OAAO,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;gBAC7D,0BAA0B,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;gBACtD,0BAA0B,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;YACxD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,IAAI,CAAC,sCAAsC,aAAa,aAAa,EAAE,KAAK,C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,QAAQ,CAAC,CAAC;oCACvB,CAAC;gCACH,CAAC;4BACH,CAAC;wBACH,CAAC;oBACH,CAAC;yBAAM,IAAI,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBACrD,sDAAsD;wBACtD,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;wBACpB,IAAI,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;4BAC9B,MAAM,QAAQ,GAAG,gCAAgC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;4BAChE,IAAI,QAAQ,EAAE,CAAC;gCACb,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;4BACvB,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Webhook Management Utilities
|
|
3
|
-
* Handles webhook creation via API and YAML configuration management
|
|
4
|
-
*/
|
|
5
|
-
import { YamlConfig } from '../types/compile.types.js';
|
|
6
|
-
/**
|
|
7
|
-
* Ensures all detected webhooks exist in the YAML config with valid webhook IDs.
|
|
8
|
-
* If a webhook doesn't exist or has no ID, creates it via the API.
|
|
9
|
-
*
|
|
10
|
-
* @param webhooksArray - Array of webhooks detected from source code
|
|
11
|
-
* @param config - The skill configuration from lua.skill.yaml
|
|
12
|
-
* @returns Updated webhooks array with valid webhook IDs
|
|
13
|
-
*/
|
|
14
|
-
export declare function ensureWebhooksExistInYaml(webhooksArray: any[], config: YamlConfig): Promise<any[]>;
|
|
15
|
-
/**
|
|
16
|
-
* Syncs the server webhooks with the YAML configuration.
|
|
17
|
-
* Performs a two-way sync:
|
|
18
|
-
* 1. Warns about orphaned webhooks (on server but not in local code)
|
|
19
|
-
* 2. Updates YAML with active version numbers from server
|
|
20
|
-
*
|
|
21
|
-
* Note: Webhooks are no longer automatically deleted during compile.
|
|
22
|
-
* Use "lua webhooks delete <name>" to explicitly remove webhooks.
|
|
23
|
-
*
|
|
24
|
-
* @param config - The skill configuration from lua.skill.yaml
|
|
25
|
-
* @returns Array of messages about sync operations
|
|
26
|
-
*/
|
|
27
|
-
export declare function syncServerWebhooksWithYaml(config: YamlConfig): Promise<string[]>;
|