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
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin registry for the compilation system.
|
|
3
|
+
*
|
|
4
|
+
* This is where all primitive type plugins are registered.
|
|
5
|
+
* To add a new primitive type:
|
|
6
|
+
* 1. Create a new plugin class implementing CompilationPlugin
|
|
7
|
+
* 2. Import it here
|
|
8
|
+
* 3. Register it in the constructor
|
|
9
|
+
*
|
|
10
|
+
* That's the ONLY place you need to change.
|
|
11
|
+
*/
|
|
12
|
+
import { ToolPlugin } from './tool.plugin.js';
|
|
13
|
+
import { JobPlugin } from './job.plugin.js';
|
|
14
|
+
import { WebhookPlugin } from './webhook.plugin.js';
|
|
15
|
+
import { PreProcessorPlugin } from './preprocessor.plugin.js';
|
|
16
|
+
import { PostProcessorPlugin } from './postprocessor.plugin.js';
|
|
17
|
+
import { MCPServerPlugin } from './mcp-server.plugin.js';
|
|
18
|
+
import { SkillPlugin } from './skill.plugin.js';
|
|
19
|
+
/**
|
|
20
|
+
* Registry of all compilation plugins.
|
|
21
|
+
*
|
|
22
|
+
* Plugins are looked up by their 'kind' property, which must match
|
|
23
|
+
* the primitive's kind value exactly.
|
|
24
|
+
*/
|
|
25
|
+
export class PluginRegistry {
|
|
26
|
+
constructor() {
|
|
27
|
+
// =========================================================================
|
|
28
|
+
// REGISTER ALL PLUGINS HERE
|
|
29
|
+
// =========================================================================
|
|
30
|
+
// To add a new primitive type, just add a line here:
|
|
31
|
+
this.plugins = new Map();
|
|
32
|
+
this.register(new ToolPlugin());
|
|
33
|
+
this.register(new JobPlugin());
|
|
34
|
+
this.register(new WebhookPlugin());
|
|
35
|
+
this.register(new PreProcessorPlugin());
|
|
36
|
+
this.register(new PostProcessorPlugin());
|
|
37
|
+
this.register(new MCPServerPlugin());
|
|
38
|
+
this.register(new SkillPlugin());
|
|
39
|
+
// =========================================================================
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Register a plugin.
|
|
43
|
+
* @throws Error if a plugin with the same kind is already registered
|
|
44
|
+
*/
|
|
45
|
+
register(plugin) {
|
|
46
|
+
if (this.plugins.has(plugin.kind)) {
|
|
47
|
+
throw new Error(`Plugin conflict: A plugin for kind '${plugin.kind}' is already registered. ` +
|
|
48
|
+
`Each primitive type can only have one plugin.`);
|
|
49
|
+
}
|
|
50
|
+
this.plugins.set(plugin.kind, plugin);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Get a plugin by kind.
|
|
54
|
+
*/
|
|
55
|
+
get(kind) {
|
|
56
|
+
return this.plugins.get(kind);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Get all registered plugins.
|
|
60
|
+
*/
|
|
61
|
+
getAll() {
|
|
62
|
+
return Array.from(this.plugins.values());
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get all registered primitive kinds.
|
|
66
|
+
*/
|
|
67
|
+
getAllKinds() {
|
|
68
|
+
return Array.from(this.plugins.keys());
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Check if a plugin exists for a kind.
|
|
72
|
+
*/
|
|
73
|
+
has(kind) {
|
|
74
|
+
return this.plugins.has(kind);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Get the number of registered plugins.
|
|
78
|
+
*/
|
|
79
|
+
get size() {
|
|
80
|
+
return this.plugins.size;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
// =============================================================================
|
|
84
|
+
// SINGLETON INSTANCE
|
|
85
|
+
// =============================================================================
|
|
86
|
+
/**
|
|
87
|
+
* The global plugin registry instance.
|
|
88
|
+
* Use this in the compiler and CLI.
|
|
89
|
+
*/
|
|
90
|
+
export const pluginRegistry = new PluginRegistry();
|
|
91
|
+
// =============================================================================
|
|
92
|
+
// HELPER FUNCTIONS
|
|
93
|
+
// =============================================================================
|
|
94
|
+
/**
|
|
95
|
+
* Get all define function names (for detection).
|
|
96
|
+
* E.g., ['defineTool', 'defineJob', 'defineWebhook', ...]
|
|
97
|
+
*/
|
|
98
|
+
export function getAllDefineFunctions() {
|
|
99
|
+
return pluginRegistry.getAll().map(p => p.defineFunction);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Get plugin by define function name.
|
|
103
|
+
*/
|
|
104
|
+
export function getPluginByDefineFunction(funcName) {
|
|
105
|
+
return pluginRegistry.getAll().find(p => p.defineFunction === funcName);
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/compiler/plugins/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,OAAO,cAAc;IAGzB;QACE,4EAA4E;QAC5E,4BAA4B;QAC5B,4EAA4E;QAC5E,qDAAqD;QAN/C,YAAO,GAAmC,IAAI,GAAG,EAAE,CAAC;QAQ1D,IAAI,CAAC,QAAQ,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;QAChC,IAAI,CAAC,QAAQ,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC;QAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,aAAa,EAAE,CAAC,CAAC;QACnC,IAAI,CAAC,QAAQ,CAAC,IAAI,kBAAkB,EAAE,CAAC,CAAC;QACxC,IAAI,CAAC,QAAQ,CAAC,IAAI,mBAAmB,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC;QACrC,IAAI,CAAC,QAAQ,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC;QAEjC,4EAA4E;IAC9E,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,MAAyB;QAChC,IAAI,IAAI,CAAC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,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,KAAK,QAAQ,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill compilation plugin.
|
|
3
|
+
*
|
|
4
|
+
* BACKWARD COMPATIBLE: Detects BOTH patterns:
|
|
5
|
+
* 1. Class-based (legacy): new LuaSkill({ ... })
|
|
6
|
+
* 2. Function-based (new): const mySkill = defineSkill({ ... })
|
|
7
|
+
*
|
|
8
|
+
* Skills are containers that group tools together. Unlike other primitives,
|
|
9
|
+
* skills don't have executable code - they are configuration/metadata that
|
|
10
|
+
* defines tool groupings and shared context.
|
|
11
|
+
*
|
|
12
|
+
* Output: JSON metadata file (not bundled JS) containing:
|
|
13
|
+
* - name, description, context
|
|
14
|
+
* - tool references (names of tools belonging to this skill)
|
|
15
|
+
*/
|
|
16
|
+
import { SourceFile, ObjectLiteralExpression } from 'ts-morph';
|
|
17
|
+
import { type PrimitiveMetadata, type SkillMetadata, type SkillMetadataFields, type ValidationResult, type ManifestContext, type CompiledPrimitive, type ManifestPrimitive } from '../types.js';
|
|
18
|
+
import { BasePlugin, ReferenceResolverContext } from './base.js';
|
|
19
|
+
/**
|
|
20
|
+
* Plugin for compiling skill primitives.
|
|
21
|
+
* Extends BasePlugin for common detection/entry point logic.
|
|
22
|
+
*/
|
|
23
|
+
export declare class SkillPlugin extends BasePlugin<SkillMetadataFields> {
|
|
24
|
+
readonly kind = "skill";
|
|
25
|
+
readonly displayName = "Skill";
|
|
26
|
+
readonly defineFunction = "defineSkill";
|
|
27
|
+
readonly legacyClassNames: string[];
|
|
28
|
+
/**
|
|
29
|
+
* Extract metadata from skill config object.
|
|
30
|
+
*/
|
|
31
|
+
protected extractFromConfig(config: ObjectLiteralExpression, exportName: string, sourcePath: string, position: {
|
|
32
|
+
line: number;
|
|
33
|
+
column: number;
|
|
34
|
+
}, pattern: 'function' | 'class'): SkillMetadata | null;
|
|
35
|
+
/**
|
|
36
|
+
* Extract tool references from the tools array.
|
|
37
|
+
*
|
|
38
|
+
* Handles:
|
|
39
|
+
* - new ToolClass() → extracts class name
|
|
40
|
+
* - toolVariable → extracts variable name
|
|
41
|
+
*/
|
|
42
|
+
private extractToolRefs;
|
|
43
|
+
/**
|
|
44
|
+
* Detect tools added via .addTools([...]) or .addTool(new Tool()) method calls.
|
|
45
|
+
* These are an alternative to the constructor tools: [...] array.
|
|
46
|
+
*/
|
|
47
|
+
private extractToolRefsFromMethodCalls;
|
|
48
|
+
validate(metadata: SkillMetadata): ValidationResult;
|
|
49
|
+
/**
|
|
50
|
+
* Add context and tools fields to the entry point.
|
|
51
|
+
*/
|
|
52
|
+
protected getEntryPointFields(metadata: SkillMetadata): string;
|
|
53
|
+
/**
|
|
54
|
+
* Resolve tool references from this skill.
|
|
55
|
+
*
|
|
56
|
+
* Skills reference tools by class/variable name. This method:
|
|
57
|
+
* 1. Finds where each tool is imported from
|
|
58
|
+
* 2. Uses ToolPlugin to detect the tool in that file
|
|
59
|
+
* 3. Returns the tool metadata for compilation
|
|
60
|
+
*/
|
|
61
|
+
resolveReferences(metadata: PrimitiveMetadata, sourceFile: SourceFile, context: ReferenceResolverContext): PrimitiveMetadata[];
|
|
62
|
+
/**
|
|
63
|
+
* Resolve a class import to its source file path.
|
|
64
|
+
*/
|
|
65
|
+
private resolveClassImport;
|
|
66
|
+
/**
|
|
67
|
+
* Create the manifest entry for a skill.
|
|
68
|
+
* Resolves tool class names to actual tool names using context.
|
|
69
|
+
*/
|
|
70
|
+
toManifestEntry(compiled: CompiledPrimitive, context?: ManifestContext): ManifestPrimitive;
|
|
71
|
+
}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill compilation plugin.
|
|
3
|
+
*
|
|
4
|
+
* BACKWARD COMPATIBLE: Detects BOTH patterns:
|
|
5
|
+
* 1. Class-based (legacy): new LuaSkill({ ... })
|
|
6
|
+
* 2. Function-based (new): const mySkill = defineSkill({ ... })
|
|
7
|
+
*
|
|
8
|
+
* Skills are containers that group tools together. Unlike other primitives,
|
|
9
|
+
* skills don't have executable code - they are configuration/metadata that
|
|
10
|
+
* defines tool groupings and shared context.
|
|
11
|
+
*
|
|
12
|
+
* Output: JSON metadata file (not bundled JS) containing:
|
|
13
|
+
* - name, description, context
|
|
14
|
+
* - tool references (names of tools belonging to this skill)
|
|
15
|
+
*/
|
|
16
|
+
import { Node } from 'ts-morph';
|
|
17
|
+
import { findImportSource } from '../utils/ast-helpers.js';
|
|
18
|
+
import { PrimitiveKind, } from '../types.js';
|
|
19
|
+
import { BasePlugin, validationError, validationWarning } from './base.js';
|
|
20
|
+
import { extractStringProperty } from '../utils/ast-helpers.js';
|
|
21
|
+
/**
|
|
22
|
+
* Plugin for compiling skill primitives.
|
|
23
|
+
* Extends BasePlugin for common detection/entry point logic.
|
|
24
|
+
*/
|
|
25
|
+
export class SkillPlugin extends BasePlugin {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
this.kind = 'skill';
|
|
29
|
+
this.displayName = 'Skill';
|
|
30
|
+
this.defineFunction = 'defineSkill';
|
|
31
|
+
this.legacyClassNames = ['LuaSkill'];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Extract metadata from skill config object.
|
|
35
|
+
*/
|
|
36
|
+
extractFromConfig(config, exportName, sourcePath, position, pattern) {
|
|
37
|
+
const common = this.extractCommonFields(config, exportName, sourcePath, position);
|
|
38
|
+
if (!common)
|
|
39
|
+
return null;
|
|
40
|
+
const context = extractStringProperty(config, 'context');
|
|
41
|
+
// Extract tool references from constructor tools array
|
|
42
|
+
const toolRefs = this.extractToolRefs(config);
|
|
43
|
+
// Also detect tools added via .addTools() / .addTool() method calls
|
|
44
|
+
const methodToolRefs = this.extractToolRefsFromMethodCalls(config.getSourceFile());
|
|
45
|
+
toolRefs.push(...methodToolRefs);
|
|
46
|
+
return {
|
|
47
|
+
kind: this.kind,
|
|
48
|
+
...common,
|
|
49
|
+
metadata: {
|
|
50
|
+
pattern,
|
|
51
|
+
context,
|
|
52
|
+
toolRefs,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Extract tool references from the tools array.
|
|
58
|
+
*
|
|
59
|
+
* Handles:
|
|
60
|
+
* - new ToolClass() → extracts class name
|
|
61
|
+
* - toolVariable → extracts variable name
|
|
62
|
+
*/
|
|
63
|
+
extractToolRefs(config) {
|
|
64
|
+
const refs = [];
|
|
65
|
+
const toolsProp = config.getProperty('tools');
|
|
66
|
+
if (!toolsProp || !Node.isPropertyAssignment(toolsProp))
|
|
67
|
+
return refs;
|
|
68
|
+
const toolsValue = toolsProp.getInitializer();
|
|
69
|
+
if (!toolsValue || !Node.isArrayLiteralExpression(toolsValue))
|
|
70
|
+
return refs;
|
|
71
|
+
for (const element of toolsValue.getElements()) {
|
|
72
|
+
if (Node.isNewExpression(element)) {
|
|
73
|
+
// new ToolClass() → get class name
|
|
74
|
+
const className = element.getExpression().getText();
|
|
75
|
+
refs.push(className);
|
|
76
|
+
}
|
|
77
|
+
else if (Node.isIdentifier(element)) {
|
|
78
|
+
// toolVariable → get variable name
|
|
79
|
+
refs.push(element.getText());
|
|
80
|
+
}
|
|
81
|
+
else if (Node.isCallExpression(element)) {
|
|
82
|
+
// defineTool(...) or someFactory() → try to get the assigned name
|
|
83
|
+
// This is trickier - for now just note we have a tool
|
|
84
|
+
refs.push(`__inline_tool_${refs.length}`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return refs;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Detect tools added via .addTools([...]) or .addTool(new Tool()) method calls.
|
|
91
|
+
* These are an alternative to the constructor tools: [...] array.
|
|
92
|
+
*/
|
|
93
|
+
extractToolRefsFromMethodCalls(sourceFile) {
|
|
94
|
+
const refs = [];
|
|
95
|
+
sourceFile.forEachDescendant((node) => {
|
|
96
|
+
if (!Node.isCallExpression(node))
|
|
97
|
+
return;
|
|
98
|
+
const expression = node.getExpression();
|
|
99
|
+
if (!Node.isPropertyAccessExpression(expression))
|
|
100
|
+
return;
|
|
101
|
+
const property = expression.getName();
|
|
102
|
+
if (property !== 'addTools' && property !== 'addTool')
|
|
103
|
+
return;
|
|
104
|
+
const args = node.getArguments();
|
|
105
|
+
if (args.length === 0)
|
|
106
|
+
return;
|
|
107
|
+
if (property === 'addTools') {
|
|
108
|
+
const arrayArg = args[0];
|
|
109
|
+
if (Node.isArrayLiteralExpression(arrayArg)) {
|
|
110
|
+
for (const element of arrayArg.getElements()) {
|
|
111
|
+
if (Node.isNewExpression(element)) {
|
|
112
|
+
refs.push(element.getExpression().getText());
|
|
113
|
+
}
|
|
114
|
+
else if (Node.isIdentifier(element)) {
|
|
115
|
+
refs.push(element.getText());
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
else if (property === 'addTool') {
|
|
121
|
+
const arg = args[0];
|
|
122
|
+
if (Node.isNewExpression(arg)) {
|
|
123
|
+
refs.push(arg.getExpression().getText());
|
|
124
|
+
}
|
|
125
|
+
else if (Node.isIdentifier(arg)) {
|
|
126
|
+
refs.push(arg.getText());
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
return refs;
|
|
131
|
+
}
|
|
132
|
+
validate(metadata) {
|
|
133
|
+
const errors = [];
|
|
134
|
+
const warnings = [];
|
|
135
|
+
if (!metadata.name) {
|
|
136
|
+
errors.push(validationError('Skill must have a name', { line: metadata.line }));
|
|
137
|
+
}
|
|
138
|
+
if (!metadata.description) {
|
|
139
|
+
warnings.push(validationWarning('Skill should have a description', { line: metadata.line }));
|
|
140
|
+
}
|
|
141
|
+
if (metadata.metadata.toolRefs.length === 0) {
|
|
142
|
+
warnings.push(validationWarning('Skill has no tools - consider adding tools or removing the skill', { line: metadata.line }));
|
|
143
|
+
}
|
|
144
|
+
return {
|
|
145
|
+
valid: errors.length === 0,
|
|
146
|
+
errors,
|
|
147
|
+
warnings,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Add context and tools fields to the entry point.
|
|
152
|
+
*/
|
|
153
|
+
getEntryPointFields(metadata) {
|
|
154
|
+
return `context: ${JSON.stringify(metadata.metadata.context || '')},
|
|
155
|
+
tools: ${JSON.stringify(metadata.metadata.toolRefs)},`;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Resolve tool references from this skill.
|
|
159
|
+
*
|
|
160
|
+
* Skills reference tools by class/variable name. This method:
|
|
161
|
+
* 1. Finds where each tool is imported from
|
|
162
|
+
* 2. Uses ToolPlugin to detect the tool in that file
|
|
163
|
+
* 3. Returns the tool metadata for compilation
|
|
164
|
+
*/
|
|
165
|
+
resolveReferences(metadata, sourceFile, context) {
|
|
166
|
+
const skillMeta = metadata.metadata;
|
|
167
|
+
const toolRefs = skillMeta.toolRefs || [];
|
|
168
|
+
if (toolRefs.length === 0) {
|
|
169
|
+
return [];
|
|
170
|
+
}
|
|
171
|
+
const toolPlugin = context.getPlugin('tool');
|
|
172
|
+
if (!toolPlugin) {
|
|
173
|
+
context.log('⚠️ No plugin registered for tool');
|
|
174
|
+
return [];
|
|
175
|
+
}
|
|
176
|
+
const tools = [];
|
|
177
|
+
for (const className of toolRefs) {
|
|
178
|
+
// Resolve where this tool class is defined
|
|
179
|
+
const toolSourcePath = this.resolveClassImport(className, sourceFile, context);
|
|
180
|
+
if (!toolSourcePath) {
|
|
181
|
+
context.log(`⚠️ Could not resolve import for tool class: ${className}`);
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
try {
|
|
185
|
+
const toolFile = context.project.addSourceFileAtPath(toolSourcePath);
|
|
186
|
+
const detected = toolPlugin.detect(toolFile);
|
|
187
|
+
// Find by class/export name
|
|
188
|
+
const match = detected.find(d => {
|
|
189
|
+
const toolMeta = d.metadata;
|
|
190
|
+
return d.exportName === className || toolMeta.className === className;
|
|
191
|
+
}) || (detected.length === 1 ? detected[0] : null);
|
|
192
|
+
if (match) {
|
|
193
|
+
tools.push(match);
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
context.log(`⚠️ Could not find tool "${className}" in ${toolSourcePath}`);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
catch (error) {
|
|
200
|
+
context.log(`⚠️ Error extracting tool ${className}: ${error}`);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return tools;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Resolve a class import to its source file path.
|
|
207
|
+
*/
|
|
208
|
+
resolveClassImport(className, sourceFile, context) {
|
|
209
|
+
return findImportSource(className, sourceFile, context.resolveImportPath);
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Create the manifest entry for a skill.
|
|
213
|
+
* Resolves tool class names to actual tool names using context.
|
|
214
|
+
*/
|
|
215
|
+
toManifestEntry(compiled, context) {
|
|
216
|
+
// Cast to skill-specific metadata type
|
|
217
|
+
const skillMetadata = compiled.metadata;
|
|
218
|
+
// Get tool references from the compiled skill's metadata
|
|
219
|
+
const toolClassNames = skillMetadata.toolRefs || [];
|
|
220
|
+
// Resolve tool class names to actual tool names
|
|
221
|
+
const toolNames = toolClassNames.map((className) => {
|
|
222
|
+
const tool = context?.agentPrimitives?.find(p => {
|
|
223
|
+
if (p.kind !== 'tool')
|
|
224
|
+
return false;
|
|
225
|
+
const toolMeta = p.metadata;
|
|
226
|
+
return toolMeta.className === className || p.name === className;
|
|
227
|
+
});
|
|
228
|
+
return tool?.name || className;
|
|
229
|
+
});
|
|
230
|
+
const skill = {
|
|
231
|
+
kind: PrimitiveKind.SKILL,
|
|
232
|
+
name: compiled.name,
|
|
233
|
+
description: compiled.description,
|
|
234
|
+
path: `artifacts/${compiled.kind}/${compiled.name}.js`,
|
|
235
|
+
sourcePath: compiled.sourcePath,
|
|
236
|
+
hash: compiled.artifact.hash,
|
|
237
|
+
context: skillMetadata.context,
|
|
238
|
+
tools: toolNames,
|
|
239
|
+
};
|
|
240
|
+
return skill;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
//# sourceMappingURL=skill.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill.plugin.js","sourceRoot":"","sources":["../../../src/compiler/plugins/skill.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAc,IAAI,EAA2B,MAAM,UAAU,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACL,aAAa,GAUd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAA4B,eAAe,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACrG,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;GAGG;AACH,MAAM,OAAO,WAAY,SAAQ,UAA+B;IAAhE;;QACW,SAAI,GAAG,OAAO,CAAC;QACf,gBAAW,GAAG,OAAO,CAAC;QACtB,mBAAc,GAAG,aAAa,CAAC;QAC/B,qBAAgB,GAAG,CAAC,UAAU,CAAC,CAAC;IA6P3C,CAAC;IA3PC;;OAEG;IACO,iBAAiB,CACzB,MAA+B,EAC/B,UAAkB,EAClB,UAAkB,EAClB,QAA0C,EAC1C,OAA6B;QAE7B,MAAM,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;QAClF,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAEzB,MAAM,OAAO,GAAG,qBAAqB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAEzD,uDAAuD;QACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAE9C,oEAAoE;QACpE,MAAM,cAAc,GAAG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,CAAC,CAAC,EAAE;gBAC9C,IAAI,CAAC,CAAC,IAAI,KAAK,MAAM;oBAAE,OAAO,KAAK,CAAC;gBACpC,MAAM,QAAQ,GAAG,CAAC,CAAC,QAA8B,CAAC;gBAClD,OAAO,QAAQ,CAAC,SAAS,KAAK,SAAS,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC;YAClE,CAAC,CAAC,CAAC;YACH,OAAO,IAAI,EAAE,IAAI,IAAI,SAAS,CAAC;QACjC,CAAC,CAAC,CAAC;QAEH,MAAM,KAAK,GAAkB;YAC3B,IAAI,EAAE,aAAa,CAAC,KAAK;YACzB,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,IAAI,EAAE,aAAa,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,KAAK;YACtD,UAAU,EAAE,QAAQ,CAAC,UAAU;YAC/B,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI;YAC5B,OAAO,EAAE,aAAa,CAAC,OAAO;YAC9B,KAAK,EAAE,SAAS;SACjB,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool compilation plugin.
|
|
3
|
+
*
|
|
4
|
+
* BACKWARD COMPATIBLE: Detects BOTH patterns:
|
|
5
|
+
* 1. Class-based (legacy): class MyTool extends LuaTool { ... }
|
|
6
|
+
* 2. Function-based (new): const myTool = defineTool({ ... })
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This plugin extends BasePlugin but overrides class-based detection because:
|
|
9
|
+
* - Class-based tools use extends/implements detection (not `new LuaTool` instantiation)
|
|
10
|
+
* - Class-based metadata is extracted from class properties, not config objects
|
|
11
|
+
* - Entry point generation differs significantly for class-based tools
|
|
12
|
+
*/
|
|
13
|
+
import { SourceFile, Project, ObjectLiteralExpression } from 'ts-morph';
|
|
14
|
+
import { type ToolMetadata, type ToolMetadataFields, type ValidationResult, type SchemaSet, type ManifestContext, type CompiledPrimitive, type ManifestPrimitive, type PrimitiveMetadata } from '../types.js';
|
|
15
|
+
import { BasePlugin } from './base.js';
|
|
16
|
+
/**
|
|
17
|
+
* Plugin for compiling tool primitives.
|
|
18
|
+
* Extends BasePlugin for function-based detection; overrides class-based detection.
|
|
19
|
+
*/
|
|
20
|
+
export declare class ToolPlugin extends BasePlugin<ToolMetadataFields> {
|
|
21
|
+
readonly kind = "tool";
|
|
22
|
+
readonly displayName = "Tool";
|
|
23
|
+
readonly defineFunction = "defineTool";
|
|
24
|
+
readonly legacyClassNames: string[];
|
|
25
|
+
/**
|
|
26
|
+
* Extract metadata from tool config object (function-based pattern).
|
|
27
|
+
* Used by BasePlugin's detectFunctionBased().
|
|
28
|
+
*/
|
|
29
|
+
protected extractFromConfig(config: ObjectLiteralExpression, exportName: string, sourcePath: string, position: {
|
|
30
|
+
line: number;
|
|
31
|
+
column: number;
|
|
32
|
+
}, pattern: 'function' | 'class'): ToolMetadata | null;
|
|
33
|
+
/**
|
|
34
|
+
* Override class-based detection to detect class DEFINITIONS (extends/implements)
|
|
35
|
+
* instead of class INSTANTIATIONS (new LuaTool).
|
|
36
|
+
*
|
|
37
|
+
* Detects:
|
|
38
|
+
* - class MyTool extends LuaTool { ... }
|
|
39
|
+
* - export default class MyTool extends LuaTool { ... }
|
|
40
|
+
*/
|
|
41
|
+
protected detectClassBased(sourceFile: SourceFile, primitives: PrimitiveMetadata<ToolMetadataFields>[]): void;
|
|
42
|
+
/**
|
|
43
|
+
* Check if a class extends or implements LuaTool.
|
|
44
|
+
*/
|
|
45
|
+
private isToolClass;
|
|
46
|
+
/**
|
|
47
|
+
* Extract a string property from a class declaration.
|
|
48
|
+
*/
|
|
49
|
+
private extractClassProperty;
|
|
50
|
+
validate(metadata: ToolMetadata): ValidationResult;
|
|
51
|
+
/**
|
|
52
|
+
* Override entry point generation to handle class-based tools specially.
|
|
53
|
+
* Function-based tools use BasePlugin's implementation.
|
|
54
|
+
*/
|
|
55
|
+
generateEntryPoint(metadata: ToolMetadata): string;
|
|
56
|
+
/**
|
|
57
|
+
* Generate entry point for class-based tools.
|
|
58
|
+
* Creates an instance and wraps it in the standard primitive format.
|
|
59
|
+
*/
|
|
60
|
+
private generateClassBasedEntryPoint;
|
|
61
|
+
/**
|
|
62
|
+
* Add runtime validation for execute function.
|
|
63
|
+
*/
|
|
64
|
+
protected getRuntimeValidation(): string;
|
|
65
|
+
extractSchemas(metadata: ToolMetadata, project: Project): Promise<SchemaSet | undefined>;
|
|
66
|
+
toManifestEntry(compiled: CompiledPrimitive, _context?: ManifestContext): ManifestPrimitive;
|
|
67
|
+
}
|