lua-cli 3.12.2 ā 3.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -13
- package/dist/api/agent.api.service.d.ts +20 -20
- package/dist/api/agent.api.service.d.ts.map +1 -1
- package/dist/api/agent.api.service.js +1 -1
- package/dist/api/agent.api.service.js.map +1 -1
- package/dist/api/agents.api.service.d.ts +3 -3
- package/dist/api/agents.api.service.d.ts.map +1 -1
- package/dist/api/agents.api.service.js +11 -9
- package/dist/api/agents.api.service.js.map +1 -1
- package/dist/api/ai.api.service.d.ts +4 -4
- package/dist/api/ai.api.service.d.ts.map +1 -1
- package/dist/api/ai.api.service.js +10 -8
- package/dist/api/ai.api.service.js.map +1 -1
- package/dist/api/auth.api.service.d.ts +3 -3
- package/dist/api/auth.api.service.d.ts.map +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.map +1 -1
- package/dist/api/backup.api.service.js +21 -7
- package/dist/api/backup.api.service.js.map +1 -1
- package/dist/api/basket.api.service.d.ts +5 -5
- package/dist/api/basket.api.service.d.ts.map +1 -1
- package/dist/api/basket.api.service.js +4 -4
- package/dist/api/basket.api.service.js.map +1 -1
- package/dist/api/cdn.api.service.d.ts +1 -1
- package/dist/api/cdn.api.service.js +3 -3
- package/dist/api/cdn.api.service.js.map +1 -1
- package/dist/api/chat.api.service.d.ts +4 -4
- package/dist/api/chat.api.service.js +3 -3
- package/dist/api/chat.api.service.js.map +1 -1
- package/dist/api/credentials.js +3 -3
- package/dist/api/custom.data.api.service.d.ts +4 -4
- package/dist/api/custom.data.api.service.d.ts.map +1 -1
- package/dist/api/custom.data.api.service.js +2 -2
- package/dist/api/custom.data.api.service.js.map +1 -1
- package/dist/api/developer.api.service.d.ts +3 -3
- package/dist/api/developer.api.service.d.ts.map +1 -1
- package/dist/api/developer.api.service.js +7 -3
- package/dist/api/developer.api.service.js.map +1 -1
- package/dist/api/device-trigger.api.service.d.ts +3 -3
- package/dist/api/device-trigger.api.service.d.ts.map +1 -1
- package/dist/api/device-trigger.api.service.js +1 -1
- package/dist/api/device-trigger.api.service.js.map +1 -1
- package/dist/api/device.api.service.d.ts +3 -3
- package/dist/api/device.api.service.d.ts.map +1 -1
- package/dist/api/device.api.service.js +1 -1
- package/dist/api/device.api.service.js.map +1 -1
- package/dist/api/http.client.d.ts +1 -1
- package/dist/api/http.client.d.ts.map +1 -1
- package/dist/api/http.client.js +6 -6
- package/dist/api/http.client.js.map +1 -1
- package/dist/api/job.api.service.d.ts +13 -14
- package/dist/api/job.api.service.d.ts.map +1 -1
- package/dist/api/job.api.service.js +12 -20
- package/dist/api/job.api.service.js.map +1 -1
- package/dist/api/lazy-instances.d.ts +12 -12
- package/dist/api/lazy-instances.js +14 -14
- package/dist/api/logs.api.service.d.ts +9 -6
- package/dist/api/logs.api.service.d.ts.map +1 -1
- package/dist/api/logs.api.service.js +12 -11
- package/dist/api/logs.api.service.js.map +1 -1
- package/dist/api/marketplace.api.service.d.ts +1 -1
- package/dist/api/marketplace.api.service.d.ts.map +1 -1
- package/dist/api/marketplace.api.service.js +18 -18
- package/dist/api/marketplace.api.service.js.map +1 -1
- package/dist/api/order.api.service.d.ts +4 -4
- package/dist/api/order.api.service.d.ts.map +1 -1
- package/dist/api/order.api.service.js +2 -2
- package/dist/api/order.api.service.js.map +1 -1
- package/dist/api/persona.api.service.d.ts +3 -3
- package/dist/api/persona.api.service.d.ts.map +1 -1
- package/dist/api/persona.api.service.js +2 -2
- package/dist/api/persona.api.service.js.map +1 -1
- package/dist/api/postprocessor.api.service.d.ts +8 -9
- package/dist/api/postprocessor.api.service.d.ts.map +1 -1
- package/dist/api/postprocessor.api.service.js +1 -2
- package/dist/api/postprocessor.api.service.js.map +1 -1
- package/dist/api/preprocessor.api.service.d.ts +8 -9
- package/dist/api/preprocessor.api.service.d.ts.map +1 -1
- package/dist/api/preprocessor.api.service.js +1 -2
- package/dist/api/preprocessor.api.service.js.map +1 -1
- package/dist/api/products.api.service.d.ts +9 -9
- package/dist/api/products.api.service.d.ts.map +1 -1
- package/dist/api/products.api.service.js +10 -10
- package/dist/api/products.api.service.js.map +1 -1
- package/dist/api/resource.api.service.d.ts +2 -2
- package/dist/api/resource.api.service.js +1 -1
- package/dist/api/skills.api.service.d.ts +4 -4
- package/dist/api/skills.api.service.d.ts.map +1 -1
- 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 +2 -2
- package/dist/api/tool.api.service.js +1 -1
- package/dist/api/unifiedto.api.service.d.ts +3 -3
- package/dist/api/unifiedto.api.service.d.ts.map +1 -1
- package/dist/api/unifiedto.api.service.js +28 -10
- package/dist/api/unifiedto.api.service.js.map +1 -1
- package/dist/api/user.data.api.service.d.ts +6 -6
- package/dist/api/user.data.api.service.d.ts.map +1 -1
- package/dist/api/user.data.api.service.js +5 -5
- package/dist/api/user.data.api.service.js.map +1 -1
- package/dist/api/webhook.api.service.d.ts +3 -3
- package/dist/api/webhook.api.service.d.ts.map +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 +3 -3
- package/dist/api/whatsapp-templates.api.service.js +1 -1
- package/dist/api-exports.d.ts +25 -25
- package/dist/api-exports.d.ts.map +1 -1
- package/dist/api-exports.js +26 -26
- package/dist/api-exports.js.map +1 -1
- package/dist/cli/command-definitions.d.ts +1 -1
- package/dist/cli/command-definitions.d.ts.map +1 -1
- package/dist/cli/command-definitions.js +209 -196
- package/dist/cli/command-definitions.js.map +1 -1
- package/dist/commands/agents.js +2 -2
- package/dist/commands/apiKey.js +12 -12
- package/dist/commands/channels.d.ts.map +1 -1
- package/dist/commands/channels.js +165 -174
- package/dist/commands/channels.js.map +1 -1
- package/dist/commands/chat-log-probe.d.ts +59 -0
- package/dist/commands/chat-log-probe.d.ts.map +1 -0
- package/dist/commands/chat-log-probe.js +87 -0
- package/dist/commands/chat-log-probe.js.map +1 -0
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +143 -40
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/chatClear.d.ts.map +1 -1
- package/dist/commands/chatClear.js +10 -6
- package/dist/commands/chatClear.js.map +1 -1
- package/dist/commands/compile.d.ts +7 -0
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +49 -12
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +8 -9
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/configure.js +5 -5
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +132 -35
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/destroy.d.ts.map +1 -1
- package/dist/commands/destroy.js +27 -17
- package/dist/commands/destroy.js.map +1 -1
- package/dist/commands/devices.d.ts.map +1 -1
- package/dist/commands/devices.js +4 -5
- package/dist/commands/devices.js.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +101 -80
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/features.d.ts.map +1 -1
- package/dist/commands/features.js +71 -82
- package/dist/commands/features.js.map +1 -1
- package/dist/commands/governance.d.ts.map +1 -1
- package/dist/commands/governance.js +17 -15
- package/dist/commands/governance.js.map +1 -1
- package/dist/commands/index.d.ts +37 -36
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +37 -36
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +80 -70
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/integrations.d.ts.map +1 -1
- package/dist/commands/integrations.js +373 -341
- package/dist/commands/integrations.js.map +1 -1
- package/dist/commands/jobs.d.ts.map +1 -1
- package/dist/commands/jobs.js +110 -78
- package/dist/commands/jobs.js.map +1 -1
- package/dist/commands/log-tip.d.ts +79 -0
- package/dist/commands/log-tip.d.ts.map +1 -0
- package/dist/commands/log-tip.js +83 -0
- package/dist/commands/log-tip.js.map +1 -0
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +166 -198
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/marketplace.d.ts.map +1 -1
- package/dist/commands/marketplace.js +381 -427
- package/dist/commands/marketplace.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +54 -56
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/models.d.ts.map +1 -1
- package/dist/commands/models.js +4 -3
- package/dist/commands/models.js.map +1 -1
- package/dist/commands/persona.d.ts.map +1 -1
- package/dist/commands/persona.js +100 -126
- package/dist/commands/persona.js.map +1 -1
- package/dist/commands/postprocessors.d.ts.map +1 -1
- package/dist/commands/postprocessors.js +87 -61
- package/dist/commands/postprocessors.js.map +1 -1
- package/dist/commands/preprocessors.d.ts.map +1 -1
- package/dist/commands/preprocessors.js +87 -61
- package/dist/commands/preprocessors.js.map +1 -1
- package/dist/commands/production.d.ts.map +1 -1
- package/dist/commands/production.js +101 -113
- package/dist/commands/production.js.map +1 -1
- package/dist/commands/push-helpers.d.ts +42 -0
- package/dist/commands/push-helpers.d.ts.map +1 -0
- package/dist/commands/push-helpers.js +48 -0
- package/dist/commands/push-helpers.js.map +1 -0
- package/dist/commands/push.d.ts +2 -0
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +388 -124
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/pushBackup.d.ts.map +1 -1
- package/dist/commands/pushBackup.js +8 -4
- package/dist/commands/pushBackup.js.map +1 -1
- package/dist/commands/resources.d.ts.map +1 -1
- package/dist/commands/resources.js +47 -60
- package/dist/commands/resources.js.map +1 -1
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/skills.js +117 -89
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/status.d.ts +14 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +731 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +70 -30
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/telemetry.d.ts.map +1 -1
- package/dist/commands/telemetry.js +4 -0
- package/dist/commands/telemetry.js.map +1 -1
- package/dist/commands/test-output.helpers.d.ts +24 -0
- package/dist/commands/test-output.helpers.d.ts.map +1 -0
- package/dist/commands/test-output.helpers.js +62 -0
- package/dist/commands/test-output.helpers.js.map +1 -0
- package/dist/commands/test.d.ts.map +1 -1
- package/dist/commands/test.js +291 -121
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +15 -3
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/webhooks.d.ts.map +1 -1
- package/dist/commands/webhooks.js +94 -87
- package/dist/commands/webhooks.js.map +1 -1
- package/dist/compiler/agent-traverser.d.ts +50 -14
- package/dist/compiler/agent-traverser.d.ts.map +1 -1
- package/dist/compiler/agent-traverser.js +189 -86
- package/dist/compiler/agent-traverser.js.map +1 -1
- package/dist/compiler/bundler.d.ts.map +1 -1
- package/dist/compiler/bundler.js +5 -5
- package/dist/compiler/bundler.js.map +1 -1
- package/dist/compiler/compiler.d.ts +32 -0
- package/dist/compiler/compiler.d.ts.map +1 -1
- package/dist/compiler/compiler.js +154 -28
- package/dist/compiler/compiler.js.map +1 -1
- package/dist/compiler/index.d.ts +3 -3
- package/dist/compiler/index.d.ts.map +1 -1
- package/dist/compiler/index.js +3 -3
- package/dist/compiler/index.js.map +1 -1
- package/dist/compiler/plugins/agent.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/agent.plugin.js +2 -4
- package/dist/compiler/plugins/agent.plugin.js.map +1 -1
- package/dist/compiler/plugins/base.d.ts +21 -0
- package/dist/compiler/plugins/base.d.ts.map +1 -1
- package/dist/compiler/plugins/base.js +13 -3
- package/dist/compiler/plugins/base.js.map +1 -1
- package/dist/compiler/plugins/device-trigger.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/device-trigger.plugin.js +8 -4
- package/dist/compiler/plugins/device-trigger.plugin.js.map +1 -1
- package/dist/compiler/plugins/device.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/device.plugin.js +4 -4
- package/dist/compiler/plugins/device.plugin.js.map +1 -1
- package/dist/compiler/plugins/job.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/job.plugin.js +15 -11
- package/dist/compiler/plugins/job.plugin.js.map +1 -1
- package/dist/compiler/plugins/mcp-server.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/mcp-server.plugin.js +10 -4
- package/dist/compiler/plugins/mcp-server.plugin.js.map +1 -1
- package/dist/compiler/plugins/registry.js +2 -2
- package/dist/compiler/plugins/registry.js.map +1 -1
- package/dist/compiler/plugins/skill.plugin.d.ts +35 -9
- package/dist/compiler/plugins/skill.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/skill.plugin.js +129 -87
- package/dist/compiler/plugins/skill.plugin.js.map +1 -1
- package/dist/compiler/plugins/tool.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/tool.plugin.js +13 -9
- package/dist/compiler/plugins/tool.plugin.js.map +1 -1
- package/dist/compiler/plugins/webhook.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/webhook.plugin.js +7 -5
- package/dist/compiler/plugins/webhook.plugin.js.map +1 -1
- package/dist/compiler/source-writer.d.ts.map +1 -1
- package/dist/compiler/source-writer.js +2 -4
- package/dist/compiler/source-writer.js.map +1 -1
- package/dist/compiler/types.d.ts +33 -0
- package/dist/compiler/types.d.ts.map +1 -1
- package/dist/compiler/types.js.map +1 -1
- package/dist/compiler/utils/ast-helpers.d.ts +1 -16
- package/dist/compiler/utils/ast-helpers.d.ts.map +1 -1
- package/dist/compiler/utils/ast-helpers.js +14 -38
- package/dist/compiler/utils/ast-helpers.js.map +1 -1
- package/dist/compiler/utils/common.d.ts +14 -0
- package/dist/compiler/utils/common.d.ts.map +1 -1
- package/dist/compiler/utils/common.js +39 -11
- package/dist/compiler/utils/common.js.map +1 -1
- package/dist/compiler/utils/file-discovery.d.ts.map +1 -1
- package/dist/compiler/utils/file-discovery.js +2 -10
- package/dist/compiler/utils/file-discovery.js.map +1 -1
- package/dist/compiler/utils/path-resolver.d.ts +67 -10
- package/dist/compiler/utils/path-resolver.d.ts.map +1 -1
- package/dist/compiler/utils/path-resolver.js +120 -24
- package/dist/compiler/utils/path-resolver.js.map +1 -1
- package/dist/compiler/utils/reference-resolver.d.ts +196 -0
- package/dist/compiler/utils/reference-resolver.d.ts.map +1 -0
- package/dist/compiler/utils/reference-resolver.js +1026 -0
- package/dist/compiler/utils/reference-resolver.js.map +1 -0
- package/dist/compiler/utils/schema-converter.d.ts +25 -0
- package/dist/compiler/utils/schema-converter.d.ts.map +1 -1
- package/dist/compiler/utils/schema-converter.js +80 -4
- package/dist/compiler/utils/schema-converter.js.map +1 -1
- package/dist/compiler/utils/workspace.d.ts +35 -0
- package/dist/compiler/utils/workspace.d.ts.map +1 -0
- package/dist/compiler/utils/workspace.js +121 -0
- package/dist/compiler/utils/workspace.js.map +1 -0
- package/dist/compiler/utils/zod-runtime.mjs +5334 -0
- package/dist/config/compile.constants.d.ts.map +1 -1
- package/dist/config/compile.constants.js +3 -1
- package/dist/config/compile.constants.js.map +1 -1
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/config/constants.js +1 -5
- package/dist/config/constants.js.map +1 -1
- package/dist/errors/auth.error.d.ts.map +1 -1
- package/dist/errors/auth.error.js +3 -5
- package/dist/errors/auth.error.js.map +1 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/instances/basket.instance.d.ts +3 -3
- package/dist/instances/basket.instance.d.ts.map +1 -1
- package/dist/instances/basket.instance.js +26 -8
- package/dist/instances/basket.instance.js.map +1 -1
- package/dist/instances/data.entry.instance.d.ts +2 -2
- package/dist/instances/data.entry.instance.d.ts.map +1 -1
- package/dist/instances/data.entry.instance.js +5 -5
- package/dist/instances/data.entry.instance.js.map +1 -1
- package/dist/instances/order.instance.d.ts +2 -2
- package/dist/instances/order.instance.d.ts.map +1 -1
- package/dist/instances/order.instance.js +20 -9
- package/dist/instances/order.instance.js.map +1 -1
- package/dist/instances/product.instance.d.ts +1 -1
- package/dist/instances/product.instance.d.ts.map +1 -1
- package/dist/instances/product.instance.js +3 -3
- package/dist/instances/product.instance.js.map +1 -1
- package/dist/instances/product.pagination.instance.d.ts +2 -2
- package/dist/instances/product.pagination.instance.d.ts.map +1 -1
- package/dist/instances/product.pagination.instance.js +6 -7
- package/dist/instances/product.pagination.instance.js.map +1 -1
- package/dist/instances/product.search.instance.d.ts +3 -3
- package/dist/instances/product.search.instance.d.ts.map +1 -1
- package/dist/instances/product.search.instance.js +3 -4
- package/dist/instances/product.search.instance.js.map +1 -1
- package/dist/instances/user.instance.d.ts +3 -3
- package/dist/instances/user.instance.d.ts.map +1 -1
- package/dist/instances/user.instance.js +19 -36
- package/dist/instances/user.instance.js.map +1 -1
- package/dist/interfaces/agent.d.ts +8 -8
- package/dist/interfaces/agent.d.ts.map +1 -1
- package/dist/interfaces/backup.d.ts +19 -1
- package/dist/interfaces/backup.d.ts.map +1 -1
- package/dist/interfaces/device-triggers.d.ts +0 -2
- package/dist/interfaces/device-triggers.d.ts.map +1 -1
- package/dist/interfaces/devices.d.ts +0 -1
- package/dist/interfaces/devices.d.ts.map +1 -1
- package/dist/interfaces/index.d.ts +8 -8
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/jobs.d.ts +2 -3
- package/dist/interfaces/jobs.d.ts.map +1 -1
- package/dist/interfaces/logs.d.ts +7 -4
- package/dist/interfaces/logs.d.ts.map +1 -1
- package/dist/interfaces/message.d.ts +3 -3
- package/dist/interfaces/message.d.ts.map +1 -1
- package/dist/interfaces/orders.d.ts +1 -1
- package/dist/interfaces/webhooks.d.ts +2 -2
- package/dist/interfaces/webhooks.d.ts.map +1 -1
- package/dist/primitives/agent.handler.d.ts.map +1 -1
- package/dist/primitives/agent.handler.js +1 -1
- package/dist/primitives/agent.handler.js.map +1 -1
- package/dist/primitives/base.handler.d.ts +12 -2
- package/dist/primitives/base.handler.d.ts.map +1 -1
- package/dist/primitives/base.handler.js +104 -73
- package/dist/primitives/base.handler.js.map +1 -1
- package/dist/primitives/device-trigger.handler.d.ts +1 -1
- package/dist/primitives/device-trigger.handler.d.ts.map +1 -1
- package/dist/primitives/device-trigger.handler.js +2 -3
- package/dist/primitives/device-trigger.handler.js.map +1 -1
- package/dist/primitives/device.handler.d.ts +1 -1
- package/dist/primitives/device.handler.d.ts.map +1 -1
- package/dist/primitives/device.handler.js +2 -3
- package/dist/primitives/device.handler.js.map +1 -1
- package/dist/primitives/index.d.ts +1 -1
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +2 -3
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/job.handler.d.ts +6 -1
- package/dist/primitives/job.handler.d.ts.map +1 -1
- package/dist/primitives/job.handler.js +9 -3
- package/dist/primitives/job.handler.js.map +1 -1
- package/dist/primitives/mcp-server.handler.d.ts.map +1 -1
- package/dist/primitives/mcp-server.handler.js +2 -2
- package/dist/primitives/mcp-server.handler.js.map +1 -1
- package/dist/primitives/postprocessor.handler.d.ts.map +1 -1
- package/dist/primitives/postprocessor.handler.js.map +1 -1
- package/dist/primitives/preprocessor.handler.d.ts +1 -1
- package/dist/primitives/preprocessor.handler.d.ts.map +1 -1
- package/dist/primitives/preprocessor.handler.js +2 -3
- package/dist/primitives/preprocessor.handler.js.map +1 -1
- package/dist/primitives/skill.handler.d.ts +1 -1
- package/dist/primitives/skill.handler.d.ts.map +1 -1
- package/dist/primitives/skill.handler.js +34 -13
- package/dist/primitives/skill.handler.js.map +1 -1
- package/dist/primitives/types.d.ts +1 -1
- package/dist/primitives/types.d.ts.map +1 -1
- package/dist/primitives/types.js.map +1 -1
- package/dist/primitives/webhook.handler.d.ts +3 -2
- package/dist/primitives/webhook.handler.d.ts.map +1 -1
- package/dist/primitives/webhook.handler.js +9 -4
- package/dist/primitives/webhook.handler.js.map +1 -1
- package/dist/services/analytics.d.ts.map +1 -1
- package/dist/services/analytics.js +4 -5
- package/dist/services/analytics.js.map +1 -1
- package/dist/services/auth.d.ts +9 -1
- package/dist/services/auth.d.ts.map +1 -1
- package/dist/services/auth.js +26 -7
- package/dist/services/auth.js.map +1 -1
- package/dist/services/sandbox.service.d.ts.map +1 -1
- package/dist/services/sandbox.service.js +132 -80
- package/dist/services/sandbox.service.js.map +1 -1
- package/dist/types/api-contracts.d.ts +4 -4
- package/dist/types/api-contracts.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/skill.d.ts +7 -7
- package/dist/types/skill.d.ts.map +1 -1
- package/dist/types/skill.js +2 -2
- package/dist/types/skill.js.map +1 -1
- package/dist/types/tool-validation.js.map +1 -1
- package/dist/types/yaml.types.js +0 -1
- package/dist/types/yaml.types.js.map +1 -1
- package/dist/utils/aliases.d.ts +7 -0
- package/dist/utils/aliases.d.ts.map +1 -0
- package/dist/utils/aliases.js +492 -0
- package/dist/utils/aliases.js.map +1 -0
- package/dist/utils/artifact-loader.d.ts +9 -0
- package/dist/utils/artifact-loader.d.ts.map +1 -1
- package/dist/utils/artifact-loader.js +16 -6
- package/dist/utils/artifact-loader.js.map +1 -1
- package/dist/utils/auth-flows.d.ts.map +1 -1
- package/dist/utils/auth-flows.js +54 -54
- package/dist/utils/auth-flows.js.map +1 -1
- package/dist/utils/backup-helpers.d.ts +24 -0
- package/dist/utils/backup-helpers.d.ts.map +1 -1
- package/dist/utils/backup-helpers.js +102 -22
- package/dist/utils/backup-helpers.js.map +1 -1
- package/dist/utils/bundle-upload.d.ts +42 -0
- package/dist/utils/bundle-upload.d.ts.map +1 -0
- package/dist/utils/bundle-upload.js +90 -0
- package/dist/utils/bundle-upload.js.map +1 -0
- package/dist/utils/chat-attachments.js +1 -1
- package/dist/utils/chat-attachments.js.map +1 -1
- package/dist/utils/cli.d.ts +24 -6
- package/dist/utils/cli.d.ts.map +1 -1
- package/dist/utils/cli.js +26 -14
- package/dist/utils/cli.js.map +1 -1
- package/dist/utils/command-utils.d.ts.map +1 -1
- package/dist/utils/command-utils.js +4 -4
- package/dist/utils/command-utils.js.map +1 -1
- package/dist/utils/deploy-helpers.d.ts.map +1 -1
- package/dist/utils/deploy-helpers.js +13 -13
- package/dist/utils/deploy-helpers.js.map +1 -1
- package/dist/utils/env-loader.utils.d.ts +1 -1
- package/dist/utils/env-loader.utils.d.ts.map +1 -1
- package/dist/utils/env-loader.utils.js +15 -22
- package/dist/utils/env-loader.utils.js.map +1 -1
- package/dist/utils/files.d.ts.map +1 -1
- package/dist/utils/files.js +23 -13
- package/dist/utils/files.js.map +1 -1
- package/dist/utils/hints.d.ts +81 -0
- package/dist/utils/hints.d.ts.map +1 -0
- package/dist/utils/hints.js +81 -0
- package/dist/utils/hints.js.map +1 -0
- package/dist/utils/init-agent.d.ts.map +1 -1
- package/dist/utils/init-agent.js +18 -20
- package/dist/utils/init-agent.js.map +1 -1
- package/dist/utils/init-helpers.d.ts.map +1 -1
- package/dist/utils/init-helpers.js +11 -11
- package/dist/utils/init-helpers.js.map +1 -1
- package/dist/utils/init-prompts.d.ts.map +1 -1
- package/dist/utils/init-prompts.js +34 -36
- package/dist/utils/init-prompts.js.map +1 -1
- package/dist/utils/prompt-handler.js +1 -1
- package/dist/utils/prompt-handler.js.map +1 -1
- package/dist/utils/sandbox-storage.d.ts.map +1 -1
- package/dist/utils/sandbox-storage.js.map +1 -1
- package/dist/utils/sandbox.d.ts +1 -1
- package/dist/utils/sandbox.d.ts.map +1 -1
- package/dist/utils/sandbox.js +107 -106
- package/dist/utils/sandbox.js.map +1 -1
- package/dist/utils/semver.js +1 -1
- package/dist/utils/semver.js.map +1 -1
- package/dist/utils/suggest.d.ts +3 -0
- package/dist/utils/suggest.d.ts.map +1 -0
- package/dist/utils/suggest.js +32 -0
- package/dist/utils/suggest.js.map +1 -0
- package/dist/utils/sync-display.d.ts.map +1 -1
- package/dist/utils/sync-display.js +15 -13
- package/dist/utils/sync-display.js.map +1 -1
- package/dist/utils/sync-fetch.d.ts.map +1 -1
- package/dist/utils/sync-fetch.js +33 -24
- package/dist/utils/sync-fetch.js.map +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/write-info.d.ts +9 -0
- package/dist/utils/write-info.d.ts.map +1 -0
- package/dist/utils/write-info.js +11 -0
- package/dist/utils/write-info.js.map +1 -0
- package/docs/README.md +1 -1
- package/node_modules/@lua/shared-types/dist/index.d.mts +76 -2
- package/node_modules/@lua/shared-types/dist/index.d.ts +76 -2
- package/node_modules/@lua/shared-types/dist/index.js +27 -0
- package/node_modules/@lua/shared-types/dist/index.mjs +24 -0
- package/node_modules/@lua/shared-types/src/ai-generate.types.ts +1 -6
- package/node_modules/@lua/shared-types/src/ai-generate.utils.ts +1 -4
- package/node_modules/@lua/shared-types/src/channel.type.ts +1 -0
- package/node_modules/@lua/shared-types/src/chat-stream.types.ts +11 -0
- package/node_modules/@lua/shared-types/src/client-tools.types.ts +47 -0
- package/node_modules/@lua/shared-types/src/device.types.ts +6 -6
- package/node_modules/@lua/shared-types/src/index.ts +3 -0
- package/node_modules/@lua/shared-types/src/sandbox-contract.ts +26 -5
- package/node_modules/@lua/shared-types/src/vm-execution-log.types.ts +41 -0
- package/package.json +10 -6
- package/scripts/build-vendor.mjs +53 -0
- package/scripts/vendor-entry.mjs +11 -0
- package/template/QUICKSTART.md +33 -33
- package/template/README.md +35 -34
- package/template/examples/README.md +44 -38
- package/template/examples/jobs/AbandonedBasketProcessorJob.ts +30 -31
- package/template/examples/jobs/DailyCleanupJob.ts +17 -18
- package/template/examples/jobs/DataMigrationJob.ts +18 -23
- package/template/examples/jobs/HealthCheckJob.ts +13 -14
- package/template/examples/postprocessors/modifyResponse.ts +14 -15
- package/template/examples/preprocessors/messageMatching.ts +28 -29
- package/template/examples/services/ApiService.ts +68 -64
- package/template/examples/services/GetWeather.ts +39 -33
- package/template/examples/skills/basket.skill.ts +27 -7
- package/template/examples/skills/product.skill.ts +21 -8
- package/template/examples/skills/tools/BasketTool.ts +97 -98
- package/template/examples/skills/tools/CreateInlineJob.ts +38 -36
- package/template/examples/skills/tools/CreatePostTool.ts +27 -28
- package/template/examples/skills/tools/CustomDataTool.ts +72 -67
- package/template/examples/skills/tools/GameScoreTrackerTool.ts +72 -78
- package/template/examples/skills/tools/GetWeatherTool.ts +43 -45
- package/template/examples/skills/tools/OrderTool.ts +58 -58
- package/template/examples/skills/tools/PaymentTool.ts +43 -43
- package/template/examples/skills/tools/PremiumFeatureTool.ts +81 -79
- package/template/examples/skills/tools/ProductsTool.ts +68 -69
- package/template/examples/skills/tools/SmartBasketTool.ts +43 -44
- package/template/examples/skills/tools/UserDataTool.ts +97 -98
- package/template/examples/skills/user.skill.ts +7 -8
- package/template/examples/webhooks/FileUploadWebhook.ts +38 -31
- package/template/examples/webhooks/PaymentWebhook.ts +23 -22
- package/template/examples/webhooks/UserEventWebhook.ts +16 -19
- package/template/lua.skill.yaml +2 -2
- package/template/package.json +1 -1
- package/template/src/index.ts +28 -28
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
* Marketplace Command
|
|
3
3
|
* A command to interact with the Lua Marketplace.
|
|
4
4
|
*/
|
|
5
|
-
import { withErrorHandling, writeProgress, writeSuccess, writeInfo, } from
|
|
6
|
-
import { safePrompt } from
|
|
7
|
-
import { MarketplaceApiService } from
|
|
8
|
-
import { initializeCommand } from
|
|
9
|
-
import { BASE_URLS } from
|
|
10
|
-
import SkillApi from
|
|
11
|
-
import DeveloperApi from
|
|
12
|
-
import { loadSandboxEnvVariables } from
|
|
13
|
-
import inquirer from
|
|
14
|
-
import { compareVersions } from
|
|
5
|
+
import { withErrorHandling, writeProgress, writeSuccess, writeInfo, writeHintBlock } from '../utils/cli.js';
|
|
6
|
+
import { safePrompt } from '../utils/prompt-handler.js';
|
|
7
|
+
import { MarketplaceApiService } from '../api/marketplace.api.service.js';
|
|
8
|
+
import { initializeCommand } from '../utils/command-utils.js';
|
|
9
|
+
import { BASE_URLS } from '../config/constants.js';
|
|
10
|
+
import SkillApi from '../api/skills.api.service.js';
|
|
11
|
+
import DeveloperApi from '../api/developer.api.service.js';
|
|
12
|
+
import { loadSandboxEnvVariables } from '../utils/env-loader.utils.js';
|
|
13
|
+
import inquirer from 'inquirer';
|
|
14
|
+
import { compareVersions } from '../utils/semver.js';
|
|
15
15
|
import { trackEvent } from '../services/analytics.js';
|
|
16
|
+
import { validateOrSuggest } from '../utils/aliases.js';
|
|
16
17
|
// Valid creator actions
|
|
17
18
|
const CREATOR_ACTIONS = ['list', 'publish', 'update', 'unlist', 'unpublish', 'view'];
|
|
18
|
-
// Valid installer actions
|
|
19
|
+
// Valid installer actions
|
|
19
20
|
const INSTALLER_ACTIONS = ['search', 'view', 'install', 'update', 'uninstall', 'installed'];
|
|
20
21
|
/**
|
|
21
22
|
* Shows marketplace usage help
|
|
@@ -62,44 +63,24 @@ export async function marketplaceCommand(role, action, options) {
|
|
|
62
63
|
let selectedRole = null;
|
|
63
64
|
// Step 3: Check if role was provided as argument
|
|
64
65
|
if (role) {
|
|
65
|
-
const normalizedRole = role
|
|
66
|
-
|
|
67
|
-
selectedRole = "creator";
|
|
68
|
-
}
|
|
69
|
-
else if (normalizedRole === "install" ||
|
|
70
|
-
normalizedRole === "installer") {
|
|
71
|
-
selectedRole = "installer";
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
console.error(`ā Invalid role: "${role}". Must be "create" or "install".`);
|
|
75
|
-
showMarketplaceUsage();
|
|
76
|
-
throw new Error("Operation failed");
|
|
77
|
-
}
|
|
66
|
+
const normalizedRole = validateOrSuggest('marketplace.role', role);
|
|
67
|
+
selectedRole = normalizedRole === 'create' ? 'creator' : 'installer';
|
|
78
68
|
}
|
|
79
69
|
// Step 4: If action is provided, run non-interactive mode
|
|
80
70
|
if (selectedRole && action) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if (!CREATOR_ACTIONS.includes(normalizedAction)) {
|
|
84
|
-
console.error(`ā Invalid creator action: "${action}"`);
|
|
85
|
-
console.log(`\nValid actions: ${CREATOR_ACTIONS.join(', ')}`);
|
|
86
|
-
throw new Error("Invalid creator action:");
|
|
87
|
-
}
|
|
71
|
+
if (selectedRole === 'creator') {
|
|
72
|
+
const normalizedAction = validateOrSuggest('marketplace.action.create', action);
|
|
88
73
|
await executeCreatorActionNonInteractive(marketplaceApi, config, apiKey, normalizedAction, options || {});
|
|
89
74
|
}
|
|
90
75
|
else {
|
|
91
|
-
|
|
92
|
-
console.error(`ā Invalid installer action: "${action}"`);
|
|
93
|
-
console.log(`\nValid actions: ${INSTALLER_ACTIONS.join(', ')}`);
|
|
94
|
-
throw new Error("Invalid installer action:");
|
|
95
|
-
}
|
|
76
|
+
const normalizedAction = validateOrSuggest('marketplace.action.install', action);
|
|
96
77
|
await executeInstallerActionNonInteractive(marketplaceApi, config, apiKey, normalizedAction, options || {});
|
|
97
78
|
}
|
|
98
79
|
return;
|
|
99
80
|
}
|
|
100
81
|
// If role was provided as argument (but no action), go directly to that flow
|
|
101
82
|
if (selectedRole) {
|
|
102
|
-
if (selectedRole ===
|
|
83
|
+
if (selectedRole === 'creator') {
|
|
103
84
|
await handleCreatorActions(marketplaceApi, config, apiKey);
|
|
104
85
|
}
|
|
105
86
|
else {
|
|
@@ -112,31 +93,31 @@ export async function marketplaceCommand(role, action, options) {
|
|
|
112
93
|
while (!exit) {
|
|
113
94
|
const roleAnswer = await safePrompt([
|
|
114
95
|
{
|
|
115
|
-
type:
|
|
116
|
-
name:
|
|
117
|
-
message:
|
|
96
|
+
type: 'list',
|
|
97
|
+
name: 'role',
|
|
98
|
+
message: 'What would you like to do?',
|
|
118
99
|
choices: [
|
|
119
100
|
{
|
|
120
|
-
name:
|
|
121
|
-
value:
|
|
101
|
+
name: 'As a Creator (Publish & Manage your skills)',
|
|
102
|
+
value: 'creator',
|
|
122
103
|
},
|
|
123
104
|
{
|
|
124
|
-
name:
|
|
125
|
-
value:
|
|
105
|
+
name: 'As an Installer (Find & Install skills)',
|
|
106
|
+
value: 'installer',
|
|
126
107
|
},
|
|
127
|
-
{ name:
|
|
108
|
+
{ name: 'Exit', value: 'exit' },
|
|
128
109
|
],
|
|
129
110
|
},
|
|
130
111
|
]);
|
|
131
|
-
if (!roleAnswer || roleAnswer.role ===
|
|
112
|
+
if (!roleAnswer || roleAnswer.role === 'exit') {
|
|
132
113
|
exit = true;
|
|
133
|
-
console.log(
|
|
114
|
+
console.log('\nš Goodbye!\n');
|
|
134
115
|
continue;
|
|
135
116
|
}
|
|
136
|
-
if (roleAnswer.role ===
|
|
117
|
+
if (roleAnswer.role === 'creator') {
|
|
137
118
|
await handleCreatorActions(marketplaceApi, config, apiKey);
|
|
138
119
|
}
|
|
139
|
-
else if (roleAnswer.role ===
|
|
120
|
+
else if (roleAnswer.role === 'installer') {
|
|
140
121
|
await handleInstallerActions(marketplaceApi, config, apiKey);
|
|
141
122
|
}
|
|
142
123
|
}
|
|
@@ -145,7 +126,7 @@ export async function marketplaceCommand(role, action, options) {
|
|
|
145
126
|
action: action || null,
|
|
146
127
|
non_interactive: !!(selectedRole && action),
|
|
147
128
|
});
|
|
148
|
-
},
|
|
129
|
+
}, 'marketplace');
|
|
149
130
|
}
|
|
150
131
|
/**
|
|
151
132
|
* Execute creator action in non-interactive mode
|
|
@@ -208,12 +189,12 @@ async function listSkillNonInteractive(marketplaceApi, config, apiKey, options)
|
|
|
208
189
|
if (!skillName || !displayName) {
|
|
209
190
|
console.error('ā Missing required options');
|
|
210
191
|
console.log('\nUsage: lua marketplace create list --skill-name <name> --display-name <name>');
|
|
211
|
-
throw new Error(
|
|
192
|
+
throw new Error('Missing required options');
|
|
212
193
|
}
|
|
213
194
|
const agentId = config.agent?.agentId;
|
|
214
195
|
if (!agentId) {
|
|
215
196
|
console.error('ā Agent ID not found in configuration.');
|
|
216
|
-
throw new Error(
|
|
197
|
+
throw new Error('Agent ID not found in configuration.');
|
|
217
198
|
}
|
|
218
199
|
// Verify skill exists
|
|
219
200
|
const skillApi = new SkillApi(BASE_URLS.API, apiKey, agentId);
|
|
@@ -221,23 +202,23 @@ async function listSkillNonInteractive(marketplaceApi, config, apiKey, options)
|
|
|
221
202
|
const agentSkillsResponse = await skillApi.getSkills();
|
|
222
203
|
if (!agentSkillsResponse.success || !agentSkillsResponse.data) {
|
|
223
204
|
console.error(`ā Failed to fetch agent skills: ${agentSkillsResponse.message}`);
|
|
224
|
-
throw new Error(
|
|
205
|
+
throw new Error('Failed to fetch agent skills: ${agentSkillsResponse.message}');
|
|
225
206
|
}
|
|
226
|
-
const skill = agentSkillsResponse.data.skills?.find(s => s.name === skillName);
|
|
207
|
+
const skill = agentSkillsResponse.data.skills?.find((s) => s.name === skillName);
|
|
227
208
|
if (!skill) {
|
|
228
209
|
console.error(`ā Skill not found: ${skillName}`);
|
|
229
210
|
writeInfo('\nAvailable skills:');
|
|
230
|
-
agentSkillsResponse.data.skills?.forEach(s => {
|
|
211
|
+
agentSkillsResponse.data.skills?.forEach((s) => {
|
|
231
212
|
writeInfo(` - ${s.name}`);
|
|
232
213
|
});
|
|
233
|
-
throw new Error(
|
|
214
|
+
throw new Error('Skill not found: ${skillName}');
|
|
234
215
|
}
|
|
235
216
|
// Check if already listed
|
|
236
217
|
const creatorSkills = await marketplaceApi.getCreatorSkills();
|
|
237
|
-
const existingSkill = creatorSkills?.find(s => s.sourceSkillId === skill.id);
|
|
218
|
+
const existingSkill = creatorSkills?.find((s) => s.sourceSkillId === skill.id);
|
|
238
219
|
if (existingSkill?.listed) {
|
|
239
220
|
console.error(`ā Skill "${skill.name}" is already listed as "${existingSkill.displayName}".`);
|
|
240
|
-
throw new Error(
|
|
221
|
+
throw new Error('Skill');
|
|
241
222
|
}
|
|
242
223
|
// List the skill
|
|
243
224
|
writeProgress('š Listing skill on marketplace...');
|
|
@@ -257,7 +238,7 @@ async function publishVersionNonInteractive(marketplaceApi, config, apiKey, opti
|
|
|
257
238
|
if (!marketplaceId || !versionId) {
|
|
258
239
|
console.error('ā Missing required options');
|
|
259
240
|
console.log('\nUsage: lua marketplace create publish --marketplace-id <id> --version-id <id> [--changelog <text>]');
|
|
260
|
-
throw new Error(
|
|
241
|
+
throw new Error('Missing required options');
|
|
261
242
|
}
|
|
262
243
|
// Parse env vars if provided
|
|
263
244
|
let envVars;
|
|
@@ -267,7 +248,7 @@ async function publishVersionNonInteractive(marketplaceApi, config, apiKey, opti
|
|
|
267
248
|
}
|
|
268
249
|
catch (e) {
|
|
269
250
|
console.error('ā Invalid --env-vars-json: must be valid JSON');
|
|
270
|
-
throw new Error(
|
|
251
|
+
throw new Error('Invalid --env-vars-json: must be valid JSON');
|
|
271
252
|
}
|
|
272
253
|
}
|
|
273
254
|
writeProgress('š Publishing version...');
|
|
@@ -288,11 +269,11 @@ async function updateMetadataNonInteractive(marketplaceApi, options) {
|
|
|
288
269
|
if (!marketplaceId) {
|
|
289
270
|
console.error('ā Missing required option: --marketplace-id');
|
|
290
271
|
console.log('\nUsage: lua marketplace create update --marketplace-id <id> --display-name <name>');
|
|
291
|
-
throw new Error(
|
|
272
|
+
throw new Error('Missing required option: --marketplace-id');
|
|
292
273
|
}
|
|
293
274
|
if (!displayName) {
|
|
294
275
|
console.error('ā No update specified. Provide --display-name to update.');
|
|
295
|
-
throw new Error(
|
|
276
|
+
throw new Error('No update specified. Provide --display-name to update.');
|
|
296
277
|
}
|
|
297
278
|
writeProgress('š Updating skill metadata...');
|
|
298
279
|
await marketplaceApi.updateSkill(marketplaceId, { displayName });
|
|
@@ -306,12 +287,12 @@ async function unlistSkillNonInteractive(marketplaceApi, options) {
|
|
|
306
287
|
if (!marketplaceId) {
|
|
307
288
|
console.error('ā Missing required option: --marketplace-id');
|
|
308
289
|
console.log('\nUsage: lua marketplace create unlist --marketplace-id <id> [--force]');
|
|
309
|
-
throw new Error(
|
|
290
|
+
throw new Error('Missing required option: --marketplace-id');
|
|
310
291
|
}
|
|
311
292
|
if (!force) {
|
|
312
293
|
console.error('ā This action requires --force to confirm');
|
|
313
294
|
console.log('\nUsage: lua marketplace create unlist --marketplace-id <id> --force');
|
|
314
|
-
throw new Error(
|
|
295
|
+
throw new Error('This action requires --force to confirm');
|
|
315
296
|
}
|
|
316
297
|
writeProgress('š Unlisting skill...');
|
|
317
298
|
await marketplaceApi.unlistSkill(marketplaceId);
|
|
@@ -326,11 +307,11 @@ async function unpublishVersionNonInteractive(marketplaceApi, options) {
|
|
|
326
307
|
if (!marketplaceId || !versionId) {
|
|
327
308
|
console.error('ā Missing required options');
|
|
328
309
|
console.log('\nUsage: lua marketplace create unpublish --marketplace-id <id> --version-id <id> [--force]');
|
|
329
|
-
throw new Error(
|
|
310
|
+
throw new Error('Missing required options');
|
|
330
311
|
}
|
|
331
312
|
if (!force) {
|
|
332
313
|
console.error('ā This action requires --force to confirm');
|
|
333
|
-
throw new Error(
|
|
314
|
+
throw new Error('This action requires --force to confirm');
|
|
334
315
|
}
|
|
335
316
|
writeProgress('š Unpublishing version...');
|
|
336
317
|
await marketplaceApi.unpublishVersion(marketplaceId, versionId);
|
|
@@ -344,7 +325,7 @@ async function viewMyListedSkillsNonInteractive(marketplaceApi, options) {
|
|
|
344
325
|
writeProgress('š Loading your marketplace skills...');
|
|
345
326
|
const skills = await marketplaceApi.getCreatorSkills();
|
|
346
327
|
if (!skills || skills.length === 0) {
|
|
347
|
-
writeInfo(
|
|
328
|
+
writeInfo("š¦ You haven't listed any skills on the marketplace yet.");
|
|
348
329
|
return;
|
|
349
330
|
}
|
|
350
331
|
if (options.json) {
|
|
@@ -359,7 +340,7 @@ async function viewMyListedSkillsNonInteractive(marketplaceApi, options) {
|
|
|
359
340
|
console.log(` ID: ${skill.id}`);
|
|
360
341
|
console.log(` Status: ${statusText}`);
|
|
361
342
|
if (skill.versions && skill.versions.length > 0) {
|
|
362
|
-
const publishedVersions = skill.versions.filter(v => v.published);
|
|
343
|
+
const publishedVersions = skill.versions.filter((v) => v.published);
|
|
363
344
|
console.log(` Versions: ${publishedVersions.length} published / ${skill.versions.length} total`);
|
|
364
345
|
}
|
|
365
346
|
console.log('');
|
|
@@ -386,9 +367,7 @@ async function searchSkillsNonInteractive(marketplaceApi, options) {
|
|
|
386
367
|
return;
|
|
387
368
|
}
|
|
388
369
|
if (skills.length === 0) {
|
|
389
|
-
writeInfo(options.query
|
|
390
|
-
? `š¦ No skills found matching "${options.query}".`
|
|
391
|
-
: 'š¦ No skills available on the marketplace.');
|
|
370
|
+
writeInfo(options.query ? `š¦ No skills found matching "${options.query}".` : 'š¦ No skills available on the marketplace.');
|
|
392
371
|
return;
|
|
393
372
|
}
|
|
394
373
|
const totalCount = pagination?.totalCount || skills.length;
|
|
@@ -413,7 +392,7 @@ async function viewSkillNonInteractive(marketplaceApi, options) {
|
|
|
413
392
|
if (!marketplaceId) {
|
|
414
393
|
console.error('ā Missing required option: --marketplace-id');
|
|
415
394
|
console.log('\nUsage: lua marketplace install view --marketplace-id <id>');
|
|
416
|
-
throw new Error(
|
|
395
|
+
throw new Error('Missing required option: --marketplace-id');
|
|
417
396
|
}
|
|
418
397
|
writeProgress('š Loading skill details...');
|
|
419
398
|
const skill = await marketplaceApi.getSkillById(marketplaceId);
|
|
@@ -438,7 +417,7 @@ async function viewSkillNonInteractive(marketplaceApi, options) {
|
|
|
438
417
|
if (typeof skill.installCount !== 'undefined')
|
|
439
418
|
console.log(`Installs: ${skill.installCount}`);
|
|
440
419
|
if (skill.versions?.length) {
|
|
441
|
-
const publishedVersions = skill.versions.filter(v => v.published);
|
|
420
|
+
const publishedVersions = skill.versions.filter((v) => v.published);
|
|
442
421
|
console.log(`\nVersions: ${publishedVersions.length} published / ${skill.versions.length} total`);
|
|
443
422
|
if (publishedVersions.length > 0) {
|
|
444
423
|
const latest = publishedVersions.sort((a, b) => compareVersions(b.version, a.version))[0];
|
|
@@ -455,12 +434,12 @@ async function installSkillNonInteractive(marketplaceApi, config, options) {
|
|
|
455
434
|
if (!marketplaceId || !versionId) {
|
|
456
435
|
console.error('ā Missing required options');
|
|
457
436
|
console.log('\nUsage: lua marketplace install install --marketplace-id <id> --version-id <id> [--env-vars <k=v,...>]');
|
|
458
|
-
throw new Error(
|
|
437
|
+
throw new Error('Missing required options');
|
|
459
438
|
}
|
|
460
439
|
const agentId = config.agent?.agentId;
|
|
461
440
|
if (!agentId) {
|
|
462
441
|
console.error('ā Agent ID not found in configuration.');
|
|
463
|
-
throw new Error(
|
|
442
|
+
throw new Error('Agent ID not found in configuration.');
|
|
464
443
|
}
|
|
465
444
|
// Parse env vars
|
|
466
445
|
const envVarsConfig = {};
|
|
@@ -482,7 +461,7 @@ async function installSkillNonInteractive(marketplaceApi, config, options) {
|
|
|
482
461
|
writeInfo(` Env vars: ${Object.keys(envVarsConfig).length} configured`);
|
|
483
462
|
}
|
|
484
463
|
console.error('\nā Use --force to confirm installation');
|
|
485
|
-
throw new Error(
|
|
464
|
+
throw new Error('Operation failed');
|
|
486
465
|
}
|
|
487
466
|
writeProgress('š Installing skill...');
|
|
488
467
|
await marketplaceApi.installSkill(marketplaceId, agentId, {
|
|
@@ -491,6 +470,14 @@ async function installSkillNonInteractive(marketplaceApi, config, options) {
|
|
|
491
470
|
});
|
|
492
471
|
writeSuccess('ā
Skill installed successfully!');
|
|
493
472
|
writeInfo(`š” The skill is now available on agent ${agentId}.`);
|
|
473
|
+
writeHintBlock({
|
|
474
|
+
headline: 'Skill installed locally. Make it live:',
|
|
475
|
+
lines: [
|
|
476
|
+
{ label: 'Deploy:', command: 'lua push all --force --auto-deploy' },
|
|
477
|
+
{ label: 'Or stage only:', command: 'lua push all --force' },
|
|
478
|
+
],
|
|
479
|
+
when: 'success',
|
|
480
|
+
});
|
|
494
481
|
}
|
|
495
482
|
/**
|
|
496
483
|
* Non-interactive: Update an installed skill
|
|
@@ -500,31 +487,30 @@ async function updateInstalledSkillNonInteractive(marketplaceApi, config, apiKey
|
|
|
500
487
|
if (!skillName) {
|
|
501
488
|
console.error('ā Missing required option: --skill-name');
|
|
502
489
|
console.log('\nUsage: lua marketplace install update --skill-name <name> [--version-id <id>] [--env-vars <k=v,...>]');
|
|
503
|
-
throw new Error(
|
|
490
|
+
throw new Error('Missing required option: --skill-name');
|
|
504
491
|
}
|
|
505
492
|
const agentId = config.agent?.agentId;
|
|
506
493
|
if (!agentId) {
|
|
507
494
|
console.error('ā Agent ID not found in configuration.');
|
|
508
|
-
throw new Error(
|
|
495
|
+
throw new Error('Agent ID not found in configuration.');
|
|
509
496
|
}
|
|
510
497
|
// Find the installed skill
|
|
511
498
|
writeProgress('š Loading installed skills...');
|
|
512
499
|
const installedSkills = await marketplaceApi.getInstalledSkills(agentId);
|
|
513
|
-
const installedSkill = installedSkills?.find(s => s.name === skillName ||
|
|
514
|
-
s.title === skillName);
|
|
500
|
+
const installedSkill = installedSkills?.find((s) => s.name === skillName || s.title === skillName);
|
|
515
501
|
if (!installedSkill) {
|
|
516
502
|
console.error(`ā Installed skill not found: ${skillName}`);
|
|
517
503
|
if (installedSkills?.length) {
|
|
518
504
|
writeInfo('\nInstalled skills:');
|
|
519
|
-
installedSkills.forEach(s => {
|
|
505
|
+
installedSkills.forEach((s) => {
|
|
520
506
|
writeInfo(` - ${s.title || s.name}`);
|
|
521
507
|
});
|
|
522
508
|
}
|
|
523
|
-
throw new Error(
|
|
509
|
+
throw new Error('Operation failed');
|
|
524
510
|
}
|
|
525
511
|
if (!installedSkill.marketplaceSkillId) {
|
|
526
512
|
console.error('ā Skill is missing marketplace skill ID.');
|
|
527
|
-
throw new Error(
|
|
513
|
+
throw new Error('Skill is missing marketplace skill ID.');
|
|
528
514
|
}
|
|
529
515
|
// Parse env vars
|
|
530
516
|
let newEnvVars;
|
|
@@ -545,7 +531,7 @@ async function updateInstalledSkillNonInteractive(marketplaceApi, config, apiKey
|
|
|
545
531
|
updatePayload.envVars = newEnvVars;
|
|
546
532
|
if (!updatePayload.versionId && !updatePayload.envVars) {
|
|
547
533
|
console.error('ā No update specified. Provide --version-id or --env-vars.');
|
|
548
|
-
throw new Error(
|
|
534
|
+
throw new Error('No update specified. Provide --version-id or --env-vars.');
|
|
549
535
|
}
|
|
550
536
|
writeProgress('š Updating installed skill...');
|
|
551
537
|
await marketplaceApi.updateInstallation(installedSkill.marketplaceSkillId, agentId, updatePayload);
|
|
@@ -559,29 +545,28 @@ async function uninstallSkillNonInteractive(marketplaceApi, config, options) {
|
|
|
559
545
|
if (!skillName) {
|
|
560
546
|
console.error('ā Missing required option: --skill-name');
|
|
561
547
|
console.log('\nUsage: lua marketplace install uninstall --skill-name <name> [--force]');
|
|
562
|
-
throw new Error(
|
|
548
|
+
throw new Error('Missing required option: --skill-name');
|
|
563
549
|
}
|
|
564
550
|
const agentId = config.agent?.agentId;
|
|
565
551
|
if (!agentId) {
|
|
566
552
|
console.error('ā Agent ID not found in configuration.');
|
|
567
|
-
throw new Error(
|
|
553
|
+
throw new Error('Agent ID not found in configuration.');
|
|
568
554
|
}
|
|
569
555
|
// Find the installed skill
|
|
570
556
|
writeProgress('š Loading installed skills...');
|
|
571
557
|
const installedSkills = await marketplaceApi.getInstalledSkills(agentId);
|
|
572
|
-
const installedSkill = installedSkills?.find(s => s.name === skillName ||
|
|
573
|
-
s.title === skillName);
|
|
558
|
+
const installedSkill = installedSkills?.find((s) => s.name === skillName || s.title === skillName);
|
|
574
559
|
if (!installedSkill) {
|
|
575
560
|
console.error(`ā Installed skill not found: ${skillName}`);
|
|
576
|
-
throw new Error(
|
|
561
|
+
throw new Error('Installed skill not found: ${skillName}');
|
|
577
562
|
}
|
|
578
563
|
if (!installedSkill.marketplaceSkillId) {
|
|
579
564
|
console.error('ā Skill is missing marketplace skill ID.');
|
|
580
|
-
throw new Error(
|
|
565
|
+
throw new Error('Skill is missing marketplace skill ID.');
|
|
581
566
|
}
|
|
582
567
|
if (!force) {
|
|
583
568
|
console.error(`ā Use --force to confirm uninstalling "${installedSkill.title || installedSkill.name}"`);
|
|
584
|
-
throw new Error(
|
|
569
|
+
throw new Error('Use --force to confirm uninstalling');
|
|
585
570
|
}
|
|
586
571
|
writeProgress('š Uninstalling skill...');
|
|
587
572
|
await marketplaceApi.uninstallSkill(installedSkill.marketplaceSkillId, agentId);
|
|
@@ -594,7 +579,7 @@ async function listInstalledSkillsNonInteractive(marketplaceApi, config, options
|
|
|
594
579
|
const agentId = config.agent?.agentId;
|
|
595
580
|
if (!agentId) {
|
|
596
581
|
console.error('ā Agent ID not found in configuration.');
|
|
597
|
-
throw new Error(
|
|
582
|
+
throw new Error('Agent ID not found in configuration.');
|
|
598
583
|
}
|
|
599
584
|
writeProgress('š Loading installed marketplace skills...');
|
|
600
585
|
const skills = await marketplaceApi.getInstalledSkills(agentId);
|
|
@@ -627,41 +612,41 @@ async function handleCreatorActions(marketplaceApi, config, apiKey) {
|
|
|
627
612
|
while (!back) {
|
|
628
613
|
const creatorAnswer = await safePrompt([
|
|
629
614
|
{
|
|
630
|
-
type:
|
|
631
|
-
name:
|
|
632
|
-
message:
|
|
615
|
+
type: 'list',
|
|
616
|
+
name: 'action',
|
|
617
|
+
message: 'Creator Menu:',
|
|
633
618
|
choices: [
|
|
634
|
-
{ name:
|
|
635
|
-
{ name:
|
|
636
|
-
{ name:
|
|
637
|
-
{ name:
|
|
638
|
-
{ name:
|
|
639
|
-
{ name:
|
|
640
|
-
{ name:
|
|
619
|
+
{ name: 'List a new skill on the Marketplace', value: 'list' },
|
|
620
|
+
{ name: 'Publish a new version of a skill', value: 'publish' },
|
|
621
|
+
{ name: 'Update metadata for a listed skill', value: 'update' },
|
|
622
|
+
{ name: 'Unlist a skill from the Marketplace', value: 'unlist' },
|
|
623
|
+
{ name: 'Unpublish a skill version', value: 'unpublish' },
|
|
624
|
+
{ name: 'View my listed skills', value: 'view' },
|
|
625
|
+
{ name: 'Back', value: 'back' },
|
|
641
626
|
],
|
|
642
627
|
},
|
|
643
628
|
]);
|
|
644
|
-
if (!creatorAnswer || creatorAnswer.action ===
|
|
629
|
+
if (!creatorAnswer || creatorAnswer.action === 'back') {
|
|
645
630
|
back = true;
|
|
646
631
|
continue;
|
|
647
632
|
}
|
|
648
633
|
switch (creatorAnswer.action) {
|
|
649
|
-
case
|
|
634
|
+
case 'list':
|
|
650
635
|
await listSkillOnMarketplace(marketplaceApi, config, apiKey);
|
|
651
636
|
continue;
|
|
652
|
-
case
|
|
637
|
+
case 'publish':
|
|
653
638
|
await publishSkillVersion(marketplaceApi, config, apiKey);
|
|
654
639
|
continue;
|
|
655
|
-
case
|
|
640
|
+
case 'update':
|
|
656
641
|
await updateSkillMetadata(marketplaceApi, config);
|
|
657
642
|
continue;
|
|
658
|
-
case
|
|
643
|
+
case 'unlist':
|
|
659
644
|
await unlistSkillFromMarketplace(marketplaceApi);
|
|
660
645
|
continue;
|
|
661
|
-
case
|
|
646
|
+
case 'unpublish':
|
|
662
647
|
await unpublishSkillVersion(marketplaceApi);
|
|
663
648
|
continue;
|
|
664
|
-
case
|
|
649
|
+
case 'view':
|
|
665
650
|
await viewMyListedSkills(marketplaceApi);
|
|
666
651
|
continue;
|
|
667
652
|
// Other cases will be added here
|
|
@@ -669,9 +654,9 @@ async function handleCreatorActions(marketplaceApi, config, apiKey) {
|
|
|
669
654
|
console.log(`\nAction '${creatorAnswer.action}' is not implemented yet.\n`);
|
|
670
655
|
await safePrompt([
|
|
671
656
|
{
|
|
672
|
-
type:
|
|
673
|
-
name:
|
|
674
|
-
message:
|
|
657
|
+
type: 'input',
|
|
658
|
+
name: 'continue',
|
|
659
|
+
message: 'Press Enter to continue...',
|
|
675
660
|
},
|
|
676
661
|
]);
|
|
677
662
|
continue;
|
|
@@ -682,7 +667,7 @@ async function listSkillOnMarketplace(marketplaceApi, config, apiKey) {
|
|
|
682
667
|
// 1. Fetch agent skills
|
|
683
668
|
const agentId = config.agent?.agentId;
|
|
684
669
|
if (!agentId) {
|
|
685
|
-
console.error(
|
|
670
|
+
console.error('\nā Agent ID not found in configuration.');
|
|
686
671
|
return;
|
|
687
672
|
}
|
|
688
673
|
const skillApi = new SkillApi(BASE_URLS.API, apiKey, agentId);
|
|
@@ -694,16 +679,16 @@ async function listSkillOnMarketplace(marketplaceApi, config, apiKey) {
|
|
|
694
679
|
}
|
|
695
680
|
const skills = agentSkillsResponse.data.skills || [];
|
|
696
681
|
if (skills.length === 0) {
|
|
697
|
-
console.log(
|
|
682
|
+
console.log('\nā¹ļø No skills found on this agent.');
|
|
698
683
|
console.log("š” Push a skill first using 'lua push skill'.\n");
|
|
699
684
|
return;
|
|
700
685
|
}
|
|
701
686
|
// 2. Prompt user to select a skill to list
|
|
702
687
|
const skillAnswer = await safePrompt([
|
|
703
688
|
{
|
|
704
|
-
type:
|
|
705
|
-
name:
|
|
706
|
-
message:
|
|
689
|
+
type: 'list',
|
|
690
|
+
name: 'skill',
|
|
691
|
+
message: 'Which skill would you like to list on the marketplace?',
|
|
707
692
|
choices: skills.map((s) => ({
|
|
708
693
|
name: `${s.name}`,
|
|
709
694
|
value: s,
|
|
@@ -714,7 +699,7 @@ async function listSkillOnMarketplace(marketplaceApi, config, apiKey) {
|
|
|
714
699
|
return;
|
|
715
700
|
const skillToList = skillAnswer.skill;
|
|
716
701
|
// 2.5 Check if skill already exists (for re-listing)
|
|
717
|
-
writeProgress(
|
|
702
|
+
writeProgress('\nš Checking existing marketplace listings...');
|
|
718
703
|
let defaultDisplayName;
|
|
719
704
|
try {
|
|
720
705
|
const creatorSkills = await marketplaceApi.getCreatorSkills();
|
|
@@ -734,13 +719,11 @@ async function listSkillOnMarketplace(marketplaceApi, config, apiKey) {
|
|
|
734
719
|
// 3. Prompt for required metadata
|
|
735
720
|
const metadata = await safePrompt([
|
|
736
721
|
{
|
|
737
|
-
type:
|
|
738
|
-
name:
|
|
739
|
-
message:
|
|
722
|
+
type: 'input',
|
|
723
|
+
name: 'displayName',
|
|
724
|
+
message: 'Enter a display name for the marketplace:',
|
|
740
725
|
default: defaultDisplayName,
|
|
741
|
-
validate: (input) => input && input.trim().length > 0
|
|
742
|
-
? true
|
|
743
|
-
: "Display name cannot be empty.",
|
|
726
|
+
validate: (input) => (input && input.trim().length > 0 ? true : 'Display name cannot be empty.'),
|
|
744
727
|
},
|
|
745
728
|
]);
|
|
746
729
|
if (!metadata)
|
|
@@ -752,11 +735,11 @@ async function listSkillOnMarketplace(marketplaceApi, config, apiKey) {
|
|
|
752
735
|
// TODO: Add remaining metadata from user
|
|
753
736
|
};
|
|
754
737
|
try {
|
|
755
|
-
writeProgress(
|
|
738
|
+
writeProgress('\nListing skill on the marketplace...');
|
|
756
739
|
const marketplaceSkill = await marketplaceApi.listSkill(payload);
|
|
757
740
|
writeSuccess(`\nā
Skill "${marketplaceSkill.displayName}" listed successfully!`);
|
|
758
741
|
writeInfo(`Marketplace Skill ID: ${marketplaceSkill.id}`);
|
|
759
|
-
writeInfo(
|
|
742
|
+
writeInfo('š” You can now publish a version to make it installable.\n');
|
|
760
743
|
}
|
|
761
744
|
catch (error) {
|
|
762
745
|
console.error(`\nā Error listing skill: ${error.message}\n`);
|
|
@@ -765,7 +748,7 @@ async function listSkillOnMarketplace(marketplaceApi, config, apiKey) {
|
|
|
765
748
|
async function publishSkillVersion(marketplaceApi, config, apiKey) {
|
|
766
749
|
try {
|
|
767
750
|
// 1. Fetch creator's listed marketplace skills
|
|
768
|
-
writeProgress(
|
|
751
|
+
writeProgress('š Loading your marketplace skills...\n');
|
|
769
752
|
const creatorSkillsResponse = await marketplaceApi.getCreatorSkills();
|
|
770
753
|
// Only show listed skills for publishing versions
|
|
771
754
|
const listedMarketplaceSkills = (creatorSkillsResponse || []).filter((s) => s.listed);
|
|
@@ -777,9 +760,9 @@ async function publishSkillVersion(marketplaceApi, config, apiKey) {
|
|
|
777
760
|
// 2. Prompt user to select a listed marketplace skill
|
|
778
761
|
const marketplaceSkillAnswer = await safePrompt([
|
|
779
762
|
{
|
|
780
|
-
type:
|
|
781
|
-
name:
|
|
782
|
-
message:
|
|
763
|
+
type: 'list',
|
|
764
|
+
name: 'marketplaceSkill',
|
|
765
|
+
message: 'Which skill do you want to publish a new version for?',
|
|
783
766
|
choices: listedMarketplaceSkills.map((s) => ({
|
|
784
767
|
name: s.displayName,
|
|
785
768
|
value: s,
|
|
@@ -792,7 +775,7 @@ async function publishSkillVersion(marketplaceApi, config, apiKey) {
|
|
|
792
775
|
// 3. Fetch agent skills to find the corresponding source skill
|
|
793
776
|
const agentId = config.agent?.agentId;
|
|
794
777
|
if (!agentId) {
|
|
795
|
-
console.error(
|
|
778
|
+
console.error('\nā Agent ID not found in configuration.');
|
|
796
779
|
return;
|
|
797
780
|
}
|
|
798
781
|
const skillApi = new SkillApi(BASE_URLS.API, apiKey, agentId);
|
|
@@ -831,17 +814,17 @@ async function publishSkillVersion(marketplaceApi, config, apiKey) {
|
|
|
831
814
|
const getVersionStatus = (version) => {
|
|
832
815
|
const mpVersion = marketplaceVersions?.find((v) => v.version === version);
|
|
833
816
|
if (!mpVersion)
|
|
834
|
-
return { status:
|
|
817
|
+
return { status: 'new', label: 'š¤ Publish' };
|
|
835
818
|
if (mpVersion.published)
|
|
836
|
-
return { status:
|
|
837
|
-
return { status:
|
|
819
|
+
return { status: 'published', label: 'ā
Live' };
|
|
820
|
+
return { status: 'unpublished', label: 'š Republish' };
|
|
838
821
|
};
|
|
839
822
|
// 5. Prompt user to select an agent version to publish
|
|
840
823
|
const agentVersionAnswer = await safePrompt([
|
|
841
824
|
{
|
|
842
|
-
type:
|
|
843
|
-
name:
|
|
844
|
-
message:
|
|
825
|
+
type: 'list',
|
|
826
|
+
name: 'agentVersion',
|
|
827
|
+
message: 'Select a version to publish:',
|
|
845
828
|
choices: availableAgentVersions
|
|
846
829
|
.sort((a, b) => compareVersions(b.version, a.version)) // Sort descending
|
|
847
830
|
.map((v) => {
|
|
@@ -849,7 +832,7 @@ async function publishSkillVersion(marketplaceApi, config, apiKey) {
|
|
|
849
832
|
return {
|
|
850
833
|
name: `${label} - v${v.version} (Created: ${new Date(v.createdDate).toLocaleString()})`,
|
|
851
834
|
value: { ...v, _status: status },
|
|
852
|
-
disabled: status ===
|
|
835
|
+
disabled: status === 'published' ? 'Already published' : false,
|
|
853
836
|
};
|
|
854
837
|
}),
|
|
855
838
|
},
|
|
@@ -857,24 +840,24 @@ async function publishSkillVersion(marketplaceApi, config, apiKey) {
|
|
|
857
840
|
if (!agentVersionAnswer)
|
|
858
841
|
return;
|
|
859
842
|
const agentVersionToPublish = agentVersionAnswer.agentVersion;
|
|
860
|
-
if (agentVersionToPublish._status ===
|
|
843
|
+
if (agentVersionToPublish._status === 'unpublished') {
|
|
861
844
|
writeInfo(`\nā¹ļø You are republishing v${agentVersionToPublish.version}. This will make it live again and update its details.\n`);
|
|
862
845
|
}
|
|
863
846
|
// 6. Prompt for an optional changelog
|
|
864
|
-
const existingChangelog = agentVersionToPublish._status ===
|
|
847
|
+
const existingChangelog = agentVersionToPublish._status === 'unpublished'
|
|
865
848
|
? marketplaceVersions?.find((v) => v.version === agentVersionToPublish.version)?.changelog
|
|
866
849
|
: undefined;
|
|
867
850
|
const changelogAnswer = await safePrompt([
|
|
868
851
|
{
|
|
869
|
-
type:
|
|
870
|
-
name:
|
|
871
|
-
message:
|
|
852
|
+
type: 'input',
|
|
853
|
+
name: 'changelog',
|
|
854
|
+
message: 'Enter a changelog for this version (optional):',
|
|
872
855
|
default: existingChangelog,
|
|
873
856
|
},
|
|
874
857
|
]);
|
|
875
858
|
// 7. Configure environment variables for this version
|
|
876
859
|
let initialEnvVars;
|
|
877
|
-
if (agentVersionToPublish._status ===
|
|
860
|
+
if (agentVersionToPublish._status === 'unpublished') {
|
|
878
861
|
// Republishing: Use THIS version's existing metadata
|
|
879
862
|
initialEnvVars = marketplaceVersions?.find((v) => v.version === agentVersionToPublish.version)?.envVarsMetadata;
|
|
880
863
|
}
|
|
@@ -887,7 +870,7 @@ async function publishSkillVersion(marketplaceApi, config, apiKey) {
|
|
|
887
870
|
}
|
|
888
871
|
const envVars = await handleEnvVarConfiguration(initialEnvVars);
|
|
889
872
|
if (envVars === null) {
|
|
890
|
-
console.log(
|
|
873
|
+
console.log('\nCancelled publishing process.\n');
|
|
891
874
|
return;
|
|
892
875
|
}
|
|
893
876
|
// 8. Publish the version to the marketplace
|
|
@@ -899,7 +882,7 @@ async function publishSkillVersion(marketplaceApi, config, apiKey) {
|
|
|
899
882
|
writeProgress(`\n Publishing version to the marketplace...`);
|
|
900
883
|
const publishedVersion = await marketplaceApi.publishVersion(selectedMarketplaceSkill.id, payload);
|
|
901
884
|
writeSuccess(`\nā
Version ${publishedVersion.version} of "${selectedMarketplaceSkill.displayName}" has been submitted for review!`);
|
|
902
|
-
writeInfo(
|
|
885
|
+
writeInfo('š” You will be notified once the review is complete.\n');
|
|
903
886
|
}
|
|
904
887
|
catch (error) {
|
|
905
888
|
console.error(`\nā Error publishing skill version: ${error.message}\n`);
|
|
@@ -908,7 +891,7 @@ async function publishSkillVersion(marketplaceApi, config, apiKey) {
|
|
|
908
891
|
async function updateSkillMetadata(marketplaceApi, config) {
|
|
909
892
|
try {
|
|
910
893
|
// 1. Fetch creator's listed marketplace skills
|
|
911
|
-
writeProgress(
|
|
894
|
+
writeProgress('š Loading your marketplace skills...\n');
|
|
912
895
|
const listedMarketplaceSkills = await marketplaceApi.getCreatorSkills();
|
|
913
896
|
if (!listedMarketplaceSkills || listedMarketplaceSkills.length === 0) {
|
|
914
897
|
writeInfo("\nā¹ļø You haven't listed any skills on the marketplace yet.");
|
|
@@ -918,9 +901,9 @@ async function updateSkillMetadata(marketplaceApi, config) {
|
|
|
918
901
|
// 2. Prompt user to select a marketplace skill to update
|
|
919
902
|
const marketplaceSkillAnswer = await safePrompt([
|
|
920
903
|
{
|
|
921
|
-
type:
|
|
922
|
-
name:
|
|
923
|
-
message:
|
|
904
|
+
type: 'list',
|
|
905
|
+
name: 'marketplaceSkill',
|
|
906
|
+
message: 'Which skill would you like to update?',
|
|
924
907
|
choices: listedMarketplaceSkills.map((s) => ({
|
|
925
908
|
name: s.displayName,
|
|
926
909
|
value: s,
|
|
@@ -934,21 +917,21 @@ async function updateSkillMetadata(marketplaceApi, config) {
|
|
|
934
917
|
while (!back) {
|
|
935
918
|
const actionAnswer = await safePrompt([
|
|
936
919
|
{
|
|
937
|
-
type:
|
|
938
|
-
name:
|
|
920
|
+
type: 'list',
|
|
921
|
+
name: 'action',
|
|
939
922
|
message: `What would you like to update for "${marketplaceSkillToUpdate.displayName}"?`,
|
|
940
923
|
choices: [
|
|
941
|
-
{ name:
|
|
942
|
-
{ name:
|
|
924
|
+
{ name: 'Display Name', value: 'displayName' },
|
|
925
|
+
{ name: 'Finish Updating', value: 'back' },
|
|
943
926
|
],
|
|
944
927
|
},
|
|
945
928
|
]);
|
|
946
|
-
const action = actionAnswer?.action ||
|
|
947
|
-
if (action ===
|
|
929
|
+
const action = actionAnswer?.action || 'back';
|
|
930
|
+
if (action === 'back') {
|
|
948
931
|
back = true;
|
|
949
932
|
continue;
|
|
950
933
|
}
|
|
951
|
-
if (action ===
|
|
934
|
+
if (action === 'displayName') {
|
|
952
935
|
await updateDisplayName(marketplaceApi, marketplaceSkillToUpdate);
|
|
953
936
|
}
|
|
954
937
|
}
|
|
@@ -961,13 +944,11 @@ async function updateSkillMetadata(marketplaceApi, config) {
|
|
|
961
944
|
async function updateDisplayName(marketplaceApi, marketplaceSkill) {
|
|
962
945
|
const newDisplayNameAnswer = await safePrompt([
|
|
963
946
|
{
|
|
964
|
-
type:
|
|
965
|
-
name:
|
|
947
|
+
type: 'input',
|
|
948
|
+
name: 'newDisplayName',
|
|
966
949
|
message: `Enter the new display name for "${marketplaceSkill.displayName}":`,
|
|
967
950
|
default: marketplaceSkill.displayName,
|
|
968
|
-
validate: (input) => input && input.trim().length > 0
|
|
969
|
-
? true
|
|
970
|
-
: "Display name cannot be empty.",
|
|
951
|
+
validate: (input) => (input && input.trim().length > 0 ? true : 'Display name cannot be empty.'),
|
|
971
952
|
},
|
|
972
953
|
]);
|
|
973
954
|
if (!newDisplayNameAnswer)
|
|
@@ -985,7 +966,7 @@ async function updateDisplayName(marketplaceApi, marketplaceSkill) {
|
|
|
985
966
|
async function unlistSkillFromMarketplace(marketplaceApi) {
|
|
986
967
|
try {
|
|
987
968
|
// 1. Fetch creator's listed marketplace skills
|
|
988
|
-
writeProgress(
|
|
969
|
+
writeProgress('š Loading your marketplace skills...\n');
|
|
989
970
|
const listedMarketplaceSkills = await marketplaceApi.getCreatorSkills();
|
|
990
971
|
if (!listedMarketplaceSkills || listedMarketplaceSkills.length === 0) {
|
|
991
972
|
writeInfo("\nā¹ļø You haven't listed any skills on the marketplace yet.");
|
|
@@ -996,15 +977,15 @@ async function unlistSkillFromMarketplace(marketplaceApi) {
|
|
|
996
977
|
const activeListedSkills = listedMarketplaceSkills.filter((s) => s.listed);
|
|
997
978
|
if (activeListedSkills.length === 0) {
|
|
998
979
|
writeInfo("\nā¹ļø You don't have any active listings on the marketplace.");
|
|
999
|
-
writeInfo(
|
|
980
|
+
writeInfo('š” All your skills are already unlisted.\n');
|
|
1000
981
|
return;
|
|
1001
982
|
}
|
|
1002
983
|
// 2. Prompt user to select a marketplace skill to unlist
|
|
1003
984
|
const marketplaceSkillAnswer = await safePrompt([
|
|
1004
985
|
{
|
|
1005
|
-
type:
|
|
1006
|
-
name:
|
|
1007
|
-
message:
|
|
986
|
+
type: 'list',
|
|
987
|
+
name: 'marketplaceSkill',
|
|
988
|
+
message: 'Which skill would you like to unlist from the marketplace?',
|
|
1008
989
|
choices: activeListedSkills.map((s) => ({
|
|
1009
990
|
name: `${s.displayName} (${s.name})`,
|
|
1010
991
|
value: s,
|
|
@@ -1017,18 +998,18 @@ async function unlistSkillFromMarketplace(marketplaceApi) {
|
|
|
1017
998
|
// 3. Confirm the action
|
|
1018
999
|
const confirmAnswer = await safePrompt([
|
|
1019
1000
|
{
|
|
1020
|
-
type:
|
|
1021
|
-
name:
|
|
1001
|
+
type: 'confirm',
|
|
1002
|
+
name: 'confirm',
|
|
1022
1003
|
message: `ā ļø Are you sure you want to unlist "${marketplaceSkillToUnlist.displayName}"? This will unpublish all versions and remove it from the marketplace.`,
|
|
1023
1004
|
default: false,
|
|
1024
1005
|
},
|
|
1025
1006
|
]);
|
|
1026
1007
|
if (!confirmAnswer || !confirmAnswer.confirm) {
|
|
1027
|
-
writeInfo(
|
|
1008
|
+
writeInfo('\nā Unlist cancelled.\n');
|
|
1028
1009
|
return;
|
|
1029
1010
|
}
|
|
1030
1011
|
// 4. Unlist the skill
|
|
1031
|
-
writeProgress(
|
|
1012
|
+
writeProgress('\nš Unlisting skill from marketplace...');
|
|
1032
1013
|
await marketplaceApi.unlistSkill(marketplaceSkillToUnlist.id);
|
|
1033
1014
|
writeSuccess(`\nā
"${marketplaceSkillToUnlist.displayName}" has been unlisted from the marketplace.`);
|
|
1034
1015
|
writeInfo("š” You can re-list it anytime using the 'List a new skill' option.\n");
|
|
@@ -1043,7 +1024,7 @@ async function unlistSkillFromMarketplace(marketplaceApi) {
|
|
|
1043
1024
|
async function unpublishSkillVersion(marketplaceApi) {
|
|
1044
1025
|
try {
|
|
1045
1026
|
// 1. Fetch creator's listed marketplace skills
|
|
1046
|
-
writeProgress(
|
|
1027
|
+
writeProgress('š Loading your marketplace skills...\n');
|
|
1047
1028
|
const listedMarketplaceSkills = await marketplaceApi.getCreatorSkills();
|
|
1048
1029
|
if (!listedMarketplaceSkills || listedMarketplaceSkills.length === 0) {
|
|
1049
1030
|
writeInfo("\nā¹ļø You haven't listed any skills on the marketplace yet.");
|
|
@@ -1053,9 +1034,9 @@ async function unpublishSkillVersion(marketplaceApi) {
|
|
|
1053
1034
|
// 2. Prompt user to select a marketplace skill
|
|
1054
1035
|
const marketplaceSkillAnswer = await safePrompt([
|
|
1055
1036
|
{
|
|
1056
|
-
type:
|
|
1057
|
-
name:
|
|
1058
|
-
message:
|
|
1037
|
+
type: 'list',
|
|
1038
|
+
name: 'marketplaceSkill',
|
|
1039
|
+
message: 'Which skill has the version you want to unpublish?',
|
|
1059
1040
|
choices: listedMarketplaceSkills.map((s) => ({
|
|
1060
1041
|
name: `${s.displayName} (${s.name})`,
|
|
1061
1042
|
value: s,
|
|
@@ -1071,15 +1052,15 @@ async function unpublishSkillVersion(marketplaceApi) {
|
|
|
1071
1052
|
const publishedVersions = (versions || []).filter((v) => v.published);
|
|
1072
1053
|
if (publishedVersions.length === 0) {
|
|
1073
1054
|
writeInfo(`\nā¹ļø No published versions found for "${selectedMarketplaceSkill.displayName}".`);
|
|
1074
|
-
writeInfo(
|
|
1055
|
+
writeInfo('š” All versions are already unpublished.\n');
|
|
1075
1056
|
return;
|
|
1076
1057
|
}
|
|
1077
1058
|
// 4. Prompt user to select a version to unpublish
|
|
1078
1059
|
const versionAnswer = await safePrompt([
|
|
1079
1060
|
{
|
|
1080
|
-
type:
|
|
1081
|
-
name:
|
|
1082
|
-
message:
|
|
1061
|
+
type: 'list',
|
|
1062
|
+
name: 'version',
|
|
1063
|
+
message: 'Which version would you like to unpublish?',
|
|
1083
1064
|
choices: publishedVersions
|
|
1084
1065
|
.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime())
|
|
1085
1066
|
.map((v) => ({
|
|
@@ -1094,21 +1075,21 @@ async function unpublishSkillVersion(marketplaceApi) {
|
|
|
1094
1075
|
// 5. Confirm the action
|
|
1095
1076
|
const confirmAnswer = await safePrompt([
|
|
1096
1077
|
{
|
|
1097
|
-
type:
|
|
1098
|
-
name:
|
|
1078
|
+
type: 'confirm',
|
|
1079
|
+
name: 'confirm',
|
|
1099
1080
|
message: `ā ļø Are you sure you want to unpublish version ${versionToUnpublish.version} of "${selectedMarketplaceSkill.displayName}"?`,
|
|
1100
1081
|
default: false,
|
|
1101
1082
|
},
|
|
1102
1083
|
]);
|
|
1103
1084
|
if (!confirmAnswer || !confirmAnswer.confirm) {
|
|
1104
|
-
writeInfo(
|
|
1085
|
+
writeInfo('\nā Unpublish cancelled.\n');
|
|
1105
1086
|
return;
|
|
1106
1087
|
}
|
|
1107
1088
|
// 6. Unpublish the version
|
|
1108
|
-
writeProgress(
|
|
1089
|
+
writeProgress('\nš Unpublishing version...');
|
|
1109
1090
|
await marketplaceApi.unpublishVersion(selectedMarketplaceSkill.id, versionToUnpublish.id);
|
|
1110
1091
|
writeSuccess(`\nā
Version ${versionToUnpublish.version} of "${selectedMarketplaceSkill.displayName}" has been unpublished.`);
|
|
1111
|
-
writeInfo(
|
|
1092
|
+
writeInfo('š” Users can no longer install this version. You can publish it again anytime.\n');
|
|
1112
1093
|
}
|
|
1113
1094
|
catch (error) {
|
|
1114
1095
|
console.error(`\nā Error unpublishing version: ${error.message}\n`);
|
|
@@ -1119,7 +1100,7 @@ async function unpublishSkillVersion(marketplaceApi) {
|
|
|
1119
1100
|
*/
|
|
1120
1101
|
async function viewMyListedSkills(marketplaceApi) {
|
|
1121
1102
|
try {
|
|
1122
|
-
writeProgress(
|
|
1103
|
+
writeProgress('š Loading your marketplace skills...\n');
|
|
1123
1104
|
const listedMarketplaceSkills = await marketplaceApi.getCreatorSkills();
|
|
1124
1105
|
if (!listedMarketplaceSkills || listedMarketplaceSkills.length === 0) {
|
|
1125
1106
|
writeInfo("\nš¦ You haven't listed any skills on the marketplace yet.");
|
|
@@ -1130,8 +1111,8 @@ async function viewMyListedSkills(marketplaceApi) {
|
|
|
1130
1111
|
console.log(`\nš You have ${listedMarketplaceSkills.length} skill(s) on the marketplace:\n`);
|
|
1131
1112
|
// Display each skill
|
|
1132
1113
|
for (const skill of listedMarketplaceSkills) {
|
|
1133
|
-
const statusIcon = skill.listed ?
|
|
1134
|
-
const statusText = skill.listed ?
|
|
1114
|
+
const statusIcon = skill.listed ? 'ā
' : 'ā';
|
|
1115
|
+
const statusText = skill.listed ? 'Listed' : 'Unlisted';
|
|
1135
1116
|
console.log(`${statusIcon} ${skill.displayName} (${skill.name})`);
|
|
1136
1117
|
console.log(` Status: ${statusText}`);
|
|
1137
1118
|
if (skill.description) {
|
|
@@ -1141,7 +1122,7 @@ async function viewMyListedSkills(marketplaceApi) {
|
|
|
1141
1122
|
console.log(` Category: ${skill.category}`);
|
|
1142
1123
|
}
|
|
1143
1124
|
if (skill.tags && skill.tags.length > 0) {
|
|
1144
|
-
console.log(` Tags: ${skill.tags.join(
|
|
1125
|
+
console.log(` Tags: ${skill.tags.join(', ')}`);
|
|
1145
1126
|
}
|
|
1146
1127
|
if (skill.verified)
|
|
1147
1128
|
console.log(` ⨠Verified Creator`);
|
|
@@ -1164,27 +1145,25 @@ async function viewMyListedSkills(marketplaceApi) {
|
|
|
1164
1145
|
}
|
|
1165
1146
|
}
|
|
1166
1147
|
// Show install count if available
|
|
1167
|
-
if (typeof skill.installCount !==
|
|
1148
|
+
if (typeof skill.installCount !== 'undefined') {
|
|
1168
1149
|
console.log(` Installs: ${skill.installCount}`);
|
|
1169
1150
|
}
|
|
1170
1151
|
// Show environment variables from latest version
|
|
1171
1152
|
const latestVersion = skill.versions && skill.versions.length > 0
|
|
1172
1153
|
? skill.versions.sort((a, b) => compareVersions(b.version, a.version))[0]
|
|
1173
1154
|
: null;
|
|
1174
|
-
if (latestVersion &&
|
|
1175
|
-
latestVersion.envVarsMetadata
|
|
1176
|
-
Object.keys(latestVersion.envVarsMetadata).length > 0) {
|
|
1177
|
-
const envKeys = Object.keys(latestVersion.envVarsMetadata).join(", ");
|
|
1155
|
+
if (latestVersion && latestVersion.envVarsMetadata && Object.keys(latestVersion.envVarsMetadata).length > 0) {
|
|
1156
|
+
const envKeys = Object.keys(latestVersion.envVarsMetadata).join(', ');
|
|
1178
1157
|
console.log(` Environment Variables (latest version): ${envKeys} (${Object.keys(latestVersion.envVarsMetadata).length} configured)`);
|
|
1179
1158
|
}
|
|
1180
|
-
console.log(
|
|
1159
|
+
console.log(''); // Empty line between skills
|
|
1181
1160
|
}
|
|
1182
1161
|
// Prompt to continue
|
|
1183
1162
|
await safePrompt([
|
|
1184
1163
|
{
|
|
1185
|
-
type:
|
|
1186
|
-
name:
|
|
1187
|
-
message:
|
|
1164
|
+
type: 'input',
|
|
1165
|
+
name: 'continue',
|
|
1166
|
+
message: 'Press Enter to continue...',
|
|
1188
1167
|
},
|
|
1189
1168
|
]);
|
|
1190
1169
|
}
|
|
@@ -1199,43 +1178,39 @@ async function viewMyListedSkills(marketplaceApi) {
|
|
|
1199
1178
|
*/
|
|
1200
1179
|
async function handleEnvVarConfiguration(initialEnvVars) {
|
|
1201
1180
|
const detectedKeys = loadSandboxEnvVariables().map((v) => v.key);
|
|
1202
|
-
let envVars = initialEnvVars
|
|
1203
|
-
? { ...initialEnvVars }
|
|
1204
|
-
: {};
|
|
1181
|
+
let envVars = initialEnvVars ? { ...initialEnvVars } : {};
|
|
1205
1182
|
let continueManaging = true;
|
|
1206
1183
|
while (continueManaging) {
|
|
1207
1184
|
const keys = Object.keys(envVars);
|
|
1208
|
-
const statusText = keys.length > 0
|
|
1209
|
-
? `Current: ${keys.length} configured (${keys.join(", ")})`
|
|
1210
|
-
: "Current: None configured";
|
|
1185
|
+
const statusText = keys.length > 0 ? `Current: ${keys.length} configured (${keys.join(', ')})` : 'Current: None configured';
|
|
1211
1186
|
const actionAnswer = await safePrompt([
|
|
1212
1187
|
{
|
|
1213
|
-
type:
|
|
1214
|
-
name:
|
|
1188
|
+
type: 'list',
|
|
1189
|
+
name: 'action',
|
|
1215
1190
|
message: `Manage environment variables (${statusText}):`,
|
|
1216
1191
|
choices: [
|
|
1217
|
-
{ name:
|
|
1218
|
-
{ name:
|
|
1219
|
-
{ name:
|
|
1192
|
+
{ name: 'Add a new variable', value: 'add' },
|
|
1193
|
+
{ name: 'Edit an existing variable', value: 'edit' },
|
|
1194
|
+
{ name: 'Delete a variable', value: 'delete' },
|
|
1220
1195
|
new inquirer.Separator(),
|
|
1221
|
-
{ name:
|
|
1196
|
+
{ name: 'Finish and continue', value: 'done' },
|
|
1222
1197
|
],
|
|
1223
1198
|
},
|
|
1224
1199
|
]);
|
|
1225
|
-
if (!actionAnswer || actionAnswer.action ===
|
|
1200
|
+
if (!actionAnswer || actionAnswer.action === 'done') {
|
|
1226
1201
|
continueManaging = false;
|
|
1227
1202
|
continue;
|
|
1228
1203
|
}
|
|
1229
1204
|
const { action } = actionAnswer;
|
|
1230
1205
|
switch (action) {
|
|
1231
|
-
case
|
|
1232
|
-
await handleEnvVarAction(
|
|
1206
|
+
case 'add':
|
|
1207
|
+
await handleEnvVarAction('add', envVars, detectedKeys);
|
|
1233
1208
|
break;
|
|
1234
|
-
case
|
|
1235
|
-
await handleEnvVarAction(
|
|
1209
|
+
case 'edit':
|
|
1210
|
+
await handleEnvVarAction('edit', envVars, detectedKeys);
|
|
1236
1211
|
break;
|
|
1237
|
-
case
|
|
1238
|
-
await handleEnvVarAction(
|
|
1212
|
+
case 'delete':
|
|
1213
|
+
await handleEnvVarAction('delete', envVars, detectedKeys);
|
|
1239
1214
|
break;
|
|
1240
1215
|
}
|
|
1241
1216
|
}
|
|
@@ -1243,7 +1218,7 @@ async function handleEnvVarConfiguration(initialEnvVars) {
|
|
|
1243
1218
|
}
|
|
1244
1219
|
async function handleEnvVarAction(action, envVars, detectedKeys) {
|
|
1245
1220
|
const keys = Object.keys(envVars);
|
|
1246
|
-
if (action ===
|
|
1221
|
+
if (action === 'add') {
|
|
1247
1222
|
const unconfiguredKeys = detectedKeys.filter((k) => !envVars[k]);
|
|
1248
1223
|
const choices = [
|
|
1249
1224
|
...unconfiguredKeys.map((key) => ({
|
|
@@ -1251,27 +1226,27 @@ async function handleEnvVarAction(action, envVars, detectedKeys) {
|
|
|
1251
1226
|
value: key,
|
|
1252
1227
|
})),
|
|
1253
1228
|
new inquirer.Separator(),
|
|
1254
|
-
{ name:
|
|
1255
|
-
{ name:
|
|
1229
|
+
{ name: 'Manually enter a variable name', value: 'manual' },
|
|
1230
|
+
{ name: 'Back', value: 'back' },
|
|
1256
1231
|
];
|
|
1257
1232
|
const varNameAnswer = await safePrompt([
|
|
1258
1233
|
{
|
|
1259
|
-
type:
|
|
1260
|
-
name:
|
|
1261
|
-
message:
|
|
1234
|
+
type: 'list',
|
|
1235
|
+
name: 'varName',
|
|
1236
|
+
message: 'How would you like to add a variable?',
|
|
1262
1237
|
choices,
|
|
1263
1238
|
},
|
|
1264
1239
|
]);
|
|
1265
|
-
if (!varNameAnswer || varNameAnswer.varName ===
|
|
1240
|
+
if (!varNameAnswer || varNameAnswer.varName === 'back')
|
|
1266
1241
|
return;
|
|
1267
1242
|
let keyToAdd = varNameAnswer.varName;
|
|
1268
|
-
if (keyToAdd ===
|
|
1243
|
+
if (keyToAdd === 'manual') {
|
|
1269
1244
|
const manualKeyAnswer = await safePrompt([
|
|
1270
1245
|
{
|
|
1271
|
-
type:
|
|
1272
|
-
name:
|
|
1273
|
-
message:
|
|
1274
|
-
validate: (input) => input?.trim().length > 0 ? true :
|
|
1246
|
+
type: 'input',
|
|
1247
|
+
name: 'manualKey',
|
|
1248
|
+
message: 'Enter the new variable name:',
|
|
1249
|
+
validate: (input) => (input?.trim().length > 0 ? true : 'Name cannot be empty.'),
|
|
1275
1250
|
},
|
|
1276
1251
|
]);
|
|
1277
1252
|
if (!manualKeyAnswer)
|
|
@@ -1280,45 +1255,37 @@ async function handleEnvVarAction(action, envVars, detectedKeys) {
|
|
|
1280
1255
|
}
|
|
1281
1256
|
await configureEnvVar(keyToAdd, envVars);
|
|
1282
1257
|
}
|
|
1283
|
-
else if (action ===
|
|
1258
|
+
else if (action === 'edit') {
|
|
1284
1259
|
if (keys.length === 0) {
|
|
1285
|
-
writeInfo(
|
|
1260
|
+
writeInfo('\nā¹ļø No variables configured yet. Please add one first.\n');
|
|
1286
1261
|
return;
|
|
1287
1262
|
}
|
|
1288
1263
|
const keyAnswer = await safePrompt([
|
|
1289
1264
|
{
|
|
1290
|
-
type:
|
|
1291
|
-
name:
|
|
1292
|
-
message:
|
|
1293
|
-
choices: [
|
|
1294
|
-
...keys,
|
|
1295
|
-
new inquirer.Separator(),
|
|
1296
|
-
{ name: "Back", value: "back" },
|
|
1297
|
-
],
|
|
1265
|
+
type: 'list',
|
|
1266
|
+
name: 'key',
|
|
1267
|
+
message: 'Which variable do you want to edit?',
|
|
1268
|
+
choices: [...keys, new inquirer.Separator(), { name: 'Back', value: 'back' }],
|
|
1298
1269
|
},
|
|
1299
1270
|
]);
|
|
1300
|
-
if (!keyAnswer || keyAnswer.key ===
|
|
1271
|
+
if (!keyAnswer || keyAnswer.key === 'back')
|
|
1301
1272
|
return;
|
|
1302
1273
|
await configureEnvVar(keyAnswer.key, envVars);
|
|
1303
1274
|
}
|
|
1304
|
-
else if (action ===
|
|
1275
|
+
else if (action === 'delete') {
|
|
1305
1276
|
if (keys.length === 0) {
|
|
1306
|
-
writeInfo(
|
|
1277
|
+
writeInfo('\nā¹ļø No variables configured yet.\n');
|
|
1307
1278
|
return;
|
|
1308
1279
|
}
|
|
1309
1280
|
const keyAnswer = await safePrompt([
|
|
1310
1281
|
{
|
|
1311
|
-
type:
|
|
1312
|
-
name:
|
|
1313
|
-
message:
|
|
1314
|
-
choices: [
|
|
1315
|
-
...keys,
|
|
1316
|
-
new inquirer.Separator(),
|
|
1317
|
-
{ name: "Back", value: "back" },
|
|
1318
|
-
],
|
|
1282
|
+
type: 'list',
|
|
1283
|
+
name: 'key',
|
|
1284
|
+
message: 'Which variable do you want to delete?',
|
|
1285
|
+
choices: [...keys, new inquirer.Separator(), { name: 'Back', value: 'back' }],
|
|
1319
1286
|
},
|
|
1320
1287
|
]);
|
|
1321
|
-
if (!keyAnswer || keyAnswer.key ===
|
|
1288
|
+
if (!keyAnswer || keyAnswer.key === 'back')
|
|
1322
1289
|
return;
|
|
1323
1290
|
delete envVars[keyAnswer.key];
|
|
1324
1291
|
writeSuccess(`\nā
Variable "${keyAnswer.key}" has been removed.\n`);
|
|
@@ -1328,22 +1295,22 @@ async function configureEnvVar(varName, envVars) {
|
|
|
1328
1295
|
const existing = envVars[varName] || {};
|
|
1329
1296
|
const metadata = await safePrompt([
|
|
1330
1297
|
{
|
|
1331
|
-
type:
|
|
1332
|
-
name:
|
|
1298
|
+
type: 'input',
|
|
1299
|
+
name: 'description',
|
|
1333
1300
|
message: `Description for ${varName}:`,
|
|
1334
1301
|
default: existing.description,
|
|
1335
|
-
validate: (input) => input?.trim().length > 0 ? true :
|
|
1302
|
+
validate: (input) => (input?.trim().length > 0 ? true : 'Description cannot be empty.'),
|
|
1336
1303
|
},
|
|
1337
1304
|
{
|
|
1338
|
-
type:
|
|
1339
|
-
name:
|
|
1340
|
-
message:
|
|
1305
|
+
type: 'confirm',
|
|
1306
|
+
name: 'required',
|
|
1307
|
+
message: 'Is this variable required?',
|
|
1341
1308
|
default: existing.required !== undefined ? existing.required : true,
|
|
1342
1309
|
},
|
|
1343
1310
|
{
|
|
1344
|
-
type:
|
|
1345
|
-
name:
|
|
1346
|
-
message:
|
|
1311
|
+
type: 'input',
|
|
1312
|
+
name: 'example',
|
|
1313
|
+
message: 'Example value (optional):',
|
|
1347
1314
|
default: existing.example,
|
|
1348
1315
|
},
|
|
1349
1316
|
]);
|
|
@@ -1361,37 +1328,37 @@ async function handleInstallerActions(marketplaceApi, config, apiKey) {
|
|
|
1361
1328
|
while (!back) {
|
|
1362
1329
|
const installerAnswer = await safePrompt([
|
|
1363
1330
|
{
|
|
1364
|
-
type:
|
|
1365
|
-
name:
|
|
1366
|
-
message:
|
|
1331
|
+
type: 'list',
|
|
1332
|
+
name: 'action',
|
|
1333
|
+
message: 'Installer Menu:',
|
|
1367
1334
|
choices: [
|
|
1368
|
-
{ name:
|
|
1369
|
-
{ name:
|
|
1370
|
-
{ name:
|
|
1371
|
-
{ name:
|
|
1372
|
-
{ name:
|
|
1373
|
-
{ name:
|
|
1335
|
+
{ name: 'Browse & Search for skills', value: 'search' },
|
|
1336
|
+
{ name: 'Install a skill from the Marketplace', value: 'install' },
|
|
1337
|
+
{ name: 'Update an installed skill', value: 'update' },
|
|
1338
|
+
{ name: 'Uninstall a skill', value: 'uninstall' },
|
|
1339
|
+
{ name: 'List my currently installed skills', value: 'installed' },
|
|
1340
|
+
{ name: 'Back', value: 'back' },
|
|
1374
1341
|
],
|
|
1375
1342
|
},
|
|
1376
1343
|
]);
|
|
1377
|
-
if (!installerAnswer || installerAnswer.action ===
|
|
1344
|
+
if (!installerAnswer || installerAnswer.action === 'back') {
|
|
1378
1345
|
back = true;
|
|
1379
1346
|
continue;
|
|
1380
1347
|
}
|
|
1381
1348
|
switch (installerAnswer.action) {
|
|
1382
|
-
case
|
|
1349
|
+
case 'search':
|
|
1383
1350
|
await searchMarketplaceSkills(marketplaceApi);
|
|
1384
1351
|
continue;
|
|
1385
|
-
case
|
|
1352
|
+
case 'install':
|
|
1386
1353
|
await installMarketplaceSkill(marketplaceApi, config, apiKey);
|
|
1387
1354
|
continue;
|
|
1388
|
-
case
|
|
1355
|
+
case 'update':
|
|
1389
1356
|
await updateInstalledSkill(marketplaceApi, config, apiKey);
|
|
1390
1357
|
continue;
|
|
1391
|
-
case
|
|
1358
|
+
case 'uninstall':
|
|
1392
1359
|
await uninstallMarketplaceSkill(marketplaceApi, config);
|
|
1393
1360
|
continue;
|
|
1394
|
-
case
|
|
1361
|
+
case 'installed':
|
|
1395
1362
|
await listInstalledSkills(marketplaceApi, config);
|
|
1396
1363
|
continue;
|
|
1397
1364
|
// Other cases will be added here
|
|
@@ -1399,9 +1366,9 @@ async function handleInstallerActions(marketplaceApi, config, apiKey) {
|
|
|
1399
1366
|
console.log(`\nAction '${installerAnswer.action}' is not implemented yet.\n`);
|
|
1400
1367
|
await safePrompt([
|
|
1401
1368
|
{
|
|
1402
|
-
type:
|
|
1403
|
-
name:
|
|
1404
|
-
message:
|
|
1369
|
+
type: 'input',
|
|
1370
|
+
name: 'continue',
|
|
1371
|
+
message: 'Press Enter to continue...',
|
|
1405
1372
|
},
|
|
1406
1373
|
]);
|
|
1407
1374
|
continue;
|
|
@@ -1418,24 +1385,22 @@ async function browseAndSelectSkill(marketplaceApi, purpose, publishedVersionsOn
|
|
|
1418
1385
|
// 1. Prompt for search query (optional)
|
|
1419
1386
|
const searchAnswer = await safePrompt([
|
|
1420
1387
|
{
|
|
1421
|
-
type:
|
|
1422
|
-
name:
|
|
1423
|
-
message:
|
|
1388
|
+
type: 'input',
|
|
1389
|
+
name: 'query',
|
|
1390
|
+
message: 'Search for skills (leave empty to browse all):',
|
|
1424
1391
|
},
|
|
1425
1392
|
]);
|
|
1426
1393
|
if (searchAnswer === null)
|
|
1427
1394
|
return null; // User cancelled
|
|
1428
|
-
const searchQuery = searchAnswer?.query?.trim() ||
|
|
1395
|
+
const searchQuery = searchAnswer?.query?.trim() || '';
|
|
1429
1396
|
let currentPage = 1;
|
|
1430
1397
|
// Pagination loop
|
|
1431
1398
|
while (true) {
|
|
1432
1399
|
// 2. Search/browse marketplace skills with pagination
|
|
1433
|
-
writeProgress(searchQuery
|
|
1434
|
-
? `\nš Searching for "${searchQuery}"...`
|
|
1435
|
-
: "\nš Loading marketplace skills...");
|
|
1400
|
+
writeProgress(searchQuery ? `\nš Searching for "${searchQuery}"...` : '\nš Loading marketplace skills...');
|
|
1436
1401
|
const filters = {
|
|
1437
1402
|
limit: MARKETPLACE_PAGE_SIZE,
|
|
1438
|
-
page: currentPage
|
|
1403
|
+
page: currentPage,
|
|
1439
1404
|
};
|
|
1440
1405
|
if (searchQuery)
|
|
1441
1406
|
filters.search = searchQuery;
|
|
@@ -1453,19 +1418,19 @@ async function browseAndSelectSkill(marketplaceApi, purpose, publishedVersionsOn
|
|
|
1453
1418
|
writeInfo(`\nš¦ No skills found matching "${searchQuery}".`);
|
|
1454
1419
|
}
|
|
1455
1420
|
else {
|
|
1456
|
-
writeInfo(
|
|
1421
|
+
writeInfo('\nš¦ No skills available on the marketplace yet.');
|
|
1457
1422
|
}
|
|
1458
|
-
writeInfo(
|
|
1423
|
+
writeInfo('š” Be the first to publish a skill!\n');
|
|
1459
1424
|
return null;
|
|
1460
1425
|
}
|
|
1461
1426
|
// 3. Display results with pagination info
|
|
1462
|
-
const pageInfo = totalPages > 1 ? ` (Page ${currentPage}/${totalPages})` :
|
|
1463
|
-
console.log(`\nš Found ${totalCount} skill${totalCount === 1 ?
|
|
1427
|
+
const pageInfo = totalPages > 1 ? ` (Page ${currentPage}/${totalPages})` : '';
|
|
1428
|
+
console.log(`\nš Found ${totalCount} skill${totalCount === 1 ? '' : 's'}${pageInfo}:\n`);
|
|
1464
1429
|
// 4. Build choices with pagination navigation
|
|
1465
1430
|
const choices = [
|
|
1466
1431
|
...skills.map((s) => ({
|
|
1467
|
-
name: `${s.displayName} - ${s.description ||
|
|
1468
|
-
value: { type:
|
|
1432
|
+
name: `${s.displayName} - ${s.description || 'No description'}`,
|
|
1433
|
+
value: { type: 'skill', skill: s },
|
|
1469
1434
|
})),
|
|
1470
1435
|
];
|
|
1471
1436
|
// Add pagination options
|
|
@@ -1474,24 +1439,24 @@ async function browseAndSelectSkill(marketplaceApi, purpose, publishedVersionsOn
|
|
|
1474
1439
|
if (hasPrevPage) {
|
|
1475
1440
|
choices.push({
|
|
1476
1441
|
name: `ā Previous page (${currentPage - 1}/${totalPages})`,
|
|
1477
|
-
value: { type:
|
|
1442
|
+
value: { type: 'prev' },
|
|
1478
1443
|
});
|
|
1479
1444
|
}
|
|
1480
1445
|
if (hasNextPage) {
|
|
1481
1446
|
choices.push({
|
|
1482
1447
|
name: `ā Next page (${currentPage + 1}/${totalPages})`,
|
|
1483
|
-
value: { type:
|
|
1448
|
+
value: { type: 'next' },
|
|
1484
1449
|
});
|
|
1485
1450
|
}
|
|
1486
1451
|
}
|
|
1487
1452
|
choices.push(new inquirer.Separator());
|
|
1488
|
-
choices.push({ name:
|
|
1453
|
+
choices.push({ name: 'ā Back to menu', value: { type: 'back' } });
|
|
1489
1454
|
// 5. Prompt user to select
|
|
1490
|
-
const message = purpose ||
|
|
1455
|
+
const message = purpose || 'Select a skill:';
|
|
1491
1456
|
const answer = await safePrompt([
|
|
1492
1457
|
{
|
|
1493
|
-
type:
|
|
1494
|
-
name:
|
|
1458
|
+
type: 'list',
|
|
1459
|
+
name: 'selection',
|
|
1495
1460
|
message,
|
|
1496
1461
|
choices,
|
|
1497
1462
|
pageSize: MARKETPLACE_PAGE_SIZE + 5, // Show all items + navigation options
|
|
@@ -1500,16 +1465,16 @@ async function browseAndSelectSkill(marketplaceApi, purpose, publishedVersionsOn
|
|
|
1500
1465
|
if (!answer || !answer.selection)
|
|
1501
1466
|
return null;
|
|
1502
1467
|
const { selection } = answer;
|
|
1503
|
-
if (selection.type ===
|
|
1468
|
+
if (selection.type === 'skill' && selection.skill) {
|
|
1504
1469
|
return selection.skill;
|
|
1505
1470
|
}
|
|
1506
|
-
else if (selection.type ===
|
|
1471
|
+
else if (selection.type === 'next') {
|
|
1507
1472
|
currentPage++;
|
|
1508
1473
|
}
|
|
1509
|
-
else if (selection.type ===
|
|
1474
|
+
else if (selection.type === 'prev') {
|
|
1510
1475
|
currentPage--;
|
|
1511
1476
|
}
|
|
1512
|
-
else if (selection.type ===
|
|
1477
|
+
else if (selection.type === 'back') {
|
|
1513
1478
|
return null;
|
|
1514
1479
|
}
|
|
1515
1480
|
}
|
|
@@ -1523,7 +1488,7 @@ async function browseAndSelectSkill(marketplaceApi, purpose, publishedVersionsOn
|
|
|
1523
1488
|
* Browse and search for marketplace skills (view details)
|
|
1524
1489
|
*/
|
|
1525
1490
|
async function searchMarketplaceSkills(marketplaceApi) {
|
|
1526
|
-
const selectedSkill = await browseAndSelectSkill(marketplaceApi,
|
|
1491
|
+
const selectedSkill = await browseAndSelectSkill(marketplaceApi, 'Select a skill to view details:', true // Only show skills with published & approved versions
|
|
1527
1492
|
);
|
|
1528
1493
|
if (selectedSkill) {
|
|
1529
1494
|
await showSkillDetails(marketplaceApi, selectedSkill);
|
|
@@ -1535,12 +1500,12 @@ async function searchMarketplaceSkills(marketplaceApi) {
|
|
|
1535
1500
|
async function showSkillDetails(marketplaceApi, skill) {
|
|
1536
1501
|
try {
|
|
1537
1502
|
// Fetch full details
|
|
1538
|
-
writeProgress(
|
|
1503
|
+
writeProgress('\nš Loading skill details...\n');
|
|
1539
1504
|
const skillDetails = await marketplaceApi.getSkillById(skill.id);
|
|
1540
1505
|
// Display detailed information
|
|
1541
|
-
console.log(`\n${
|
|
1506
|
+
console.log(`\n${'='.repeat(60)}`);
|
|
1542
1507
|
console.log(`š¦ ${skillDetails.displayName}`);
|
|
1543
|
-
console.log(`${
|
|
1508
|
+
console.log(`${'='.repeat(60)}\n`);
|
|
1544
1509
|
console.log(`Name: ${skillDetails.name}`);
|
|
1545
1510
|
console.log(`Created: ${new Date(skillDetails.createdAt).toLocaleDateString()}`);
|
|
1546
1511
|
console.log(`Last Updated: ${new Date(skillDetails.updatedAt).toLocaleDateString()}`);
|
|
@@ -1554,10 +1519,10 @@ async function showSkillDetails(marketplaceApi, skill) {
|
|
|
1554
1519
|
console.log(`\nCategory: ${skillDetails.category}`);
|
|
1555
1520
|
}
|
|
1556
1521
|
if (skillDetails.tags && skillDetails.tags.length > 0) {
|
|
1557
|
-
console.log(`Tags: ${skillDetails.tags.join(
|
|
1522
|
+
console.log(`Tags: ${skillDetails.tags.join(', ')}`);
|
|
1558
1523
|
}
|
|
1559
1524
|
// Show install count
|
|
1560
|
-
if (typeof skillDetails.installCount !==
|
|
1525
|
+
if (typeof skillDetails.installCount !== 'undefined') {
|
|
1561
1526
|
console.log(`Installs: ${skillDetails.installCount}`);
|
|
1562
1527
|
}
|
|
1563
1528
|
// Show verified/featured badges
|
|
@@ -1577,7 +1542,7 @@ async function showSkillDetails(marketplaceApi, skill) {
|
|
|
1577
1542
|
if (latestVersion.tools && latestVersion.tools.length > 0) {
|
|
1578
1543
|
console.log(`\nTools (v${latestVersion.version}):`);
|
|
1579
1544
|
latestVersion.tools.forEach((tool) => {
|
|
1580
|
-
console.log(` ⢠${tool.name || tool.functionName ||
|
|
1545
|
+
console.log(` ⢠${tool.name || tool.functionName || 'Unnamed Tool'}`);
|
|
1581
1546
|
if (tool.description)
|
|
1582
1547
|
console.log(` ${tool.description}`);
|
|
1583
1548
|
});
|
|
@@ -1588,13 +1553,11 @@ async function showSkillDetails(marketplaceApi, skill) {
|
|
|
1588
1553
|
const latestVersion = skillDetails.versions && skillDetails.versions.length > 0
|
|
1589
1554
|
? skillDetails.versions.sort((a, b) => compareVersions(b.version, a.version))[0]
|
|
1590
1555
|
: null;
|
|
1591
|
-
if (latestVersion &&
|
|
1592
|
-
latestVersion.envVarsMetadata &&
|
|
1593
|
-
Object.keys(latestVersion.envVarsMetadata).length > 0) {
|
|
1556
|
+
if (latestVersion && latestVersion.envVarsMetadata && Object.keys(latestVersion.envVarsMetadata).length > 0) {
|
|
1594
1557
|
console.log(`\nEnvironment Variables (v${latestVersion.version}):`);
|
|
1595
1558
|
for (const [key, meta] of Object.entries(latestVersion.envVarsMetadata)) {
|
|
1596
1559
|
const varMeta = meta;
|
|
1597
|
-
const required = varMeta.required ?
|
|
1560
|
+
const required = varMeta.required ? ' (required)' : ' (optional)';
|
|
1598
1561
|
console.log(` ⢠${key}${required}`);
|
|
1599
1562
|
if (varMeta.description) {
|
|
1600
1563
|
console.log(` ${varMeta.description}`);
|
|
@@ -1608,13 +1571,13 @@ async function showSkillDetails(marketplaceApi, skill) {
|
|
|
1608
1571
|
if (skillDetails.documentationUrl) {
|
|
1609
1572
|
console.log(`Documentation: ${skillDetails.documentationUrl}`);
|
|
1610
1573
|
}
|
|
1611
|
-
console.log(`\n${
|
|
1574
|
+
console.log(`\n${'='.repeat(60)}\n`);
|
|
1612
1575
|
// Prompt to continue
|
|
1613
1576
|
await safePrompt([
|
|
1614
1577
|
{
|
|
1615
|
-
type:
|
|
1616
|
-
name:
|
|
1617
|
-
message:
|
|
1578
|
+
type: 'input',
|
|
1579
|
+
name: 'continue',
|
|
1580
|
+
message: 'Press Enter to continue...',
|
|
1618
1581
|
},
|
|
1619
1582
|
]);
|
|
1620
1583
|
}
|
|
@@ -1629,27 +1592,27 @@ async function installMarketplaceSkill(marketplaceApi, config, apiKey) {
|
|
|
1629
1592
|
try {
|
|
1630
1593
|
const agentId = config.agent?.agentId;
|
|
1631
1594
|
if (!agentId) {
|
|
1632
|
-
console.error(
|
|
1595
|
+
console.error('\nā No agent ID found in configuration.\n');
|
|
1633
1596
|
return;
|
|
1634
1597
|
}
|
|
1635
1598
|
// 1. Choose how to select the skill
|
|
1636
1599
|
const selectionMethodAnswer = await safePrompt([
|
|
1637
1600
|
{
|
|
1638
|
-
type:
|
|
1639
|
-
name:
|
|
1640
|
-
message:
|
|
1601
|
+
type: 'list',
|
|
1602
|
+
name: 'method',
|
|
1603
|
+
message: 'How would you like to find the skill?',
|
|
1641
1604
|
choices: [
|
|
1642
|
-
{ name:
|
|
1643
|
-
{ name:
|
|
1644
|
-
{ name:
|
|
1605
|
+
{ name: 'Browse and select from marketplace', value: 'browse' },
|
|
1606
|
+
{ name: 'Enter skill name and creator ID directly', value: 'direct' },
|
|
1607
|
+
{ name: 'Cancel', value: 'cancel' },
|
|
1645
1608
|
],
|
|
1646
1609
|
},
|
|
1647
1610
|
]);
|
|
1648
|
-
if (!selectionMethodAnswer || selectionMethodAnswer.method ===
|
|
1611
|
+
if (!selectionMethodAnswer || selectionMethodAnswer.method === 'cancel') {
|
|
1649
1612
|
return;
|
|
1650
1613
|
}
|
|
1651
1614
|
let selectedMarketplaceSkill = null;
|
|
1652
|
-
if (selectionMethodAnswer.method ===
|
|
1615
|
+
if (selectionMethodAnswer.method === 'browse') {
|
|
1653
1616
|
// Browse and select - only show skills with published versions
|
|
1654
1617
|
selectedMarketplaceSkill = await browseAndSelectSkill(marketplaceApi, undefined, true);
|
|
1655
1618
|
if (!selectedMarketplaceSkill)
|
|
@@ -1659,22 +1622,22 @@ async function installMarketplaceSkill(marketplaceApi, config, apiKey) {
|
|
|
1659
1622
|
// Direct entry
|
|
1660
1623
|
const directAnswer = await safePrompt([
|
|
1661
1624
|
{
|
|
1662
|
-
type:
|
|
1663
|
-
name:
|
|
1664
|
-
message:
|
|
1665
|
-
validate: (input) => input.trim().length > 0 ? true :
|
|
1625
|
+
type: 'input',
|
|
1626
|
+
name: 'name',
|
|
1627
|
+
message: 'Enter the skill name:',
|
|
1628
|
+
validate: (input) => (input.trim().length > 0 ? true : 'Skill name is required'),
|
|
1666
1629
|
},
|
|
1667
1630
|
{
|
|
1668
|
-
type:
|
|
1669
|
-
name:
|
|
1670
|
-
message:
|
|
1671
|
-
validate: (input) => input.trim().length > 0 ? true :
|
|
1631
|
+
type: 'input',
|
|
1632
|
+
name: 'creatorId',
|
|
1633
|
+
message: 'Enter the creator ID:',
|
|
1634
|
+
validate: (input) => (input.trim().length > 0 ? true : 'Creator ID is required'),
|
|
1672
1635
|
},
|
|
1673
1636
|
]);
|
|
1674
1637
|
if (!directAnswer)
|
|
1675
1638
|
return;
|
|
1676
1639
|
// Search for the skill by exact name and creator using API filters
|
|
1677
|
-
writeProgress(
|
|
1640
|
+
writeProgress('\nš Looking up skill...');
|
|
1678
1641
|
const searchResults = await marketplaceApi.searchSkills({
|
|
1679
1642
|
name: directAnswer.name,
|
|
1680
1643
|
creatorId: directAnswer.creatorId,
|
|
@@ -1709,7 +1672,7 @@ async function installMarketplaceSkill(marketplaceApi, config, apiKey) {
|
|
|
1709
1672
|
const existingSourceSkill = agentSkills.find((s) => s.id === selectedMarketplaceSkill.sourceSkillId);
|
|
1710
1673
|
if (existingSourceSkill) {
|
|
1711
1674
|
console.error(`\nā You cannot install "${selectedMarketplaceSkill.displayName}" because the source skill already exists on this agent.`);
|
|
1712
|
-
writeInfo(
|
|
1675
|
+
writeInfo('š” You already have the original skill on this agent.\n');
|
|
1713
1676
|
return;
|
|
1714
1677
|
}
|
|
1715
1678
|
}
|
|
@@ -1725,19 +1688,19 @@ async function installMarketplaceSkill(marketplaceApi, config, apiKey) {
|
|
|
1725
1688
|
const publishedVersions = (versions || []).filter((v) => v.published);
|
|
1726
1689
|
if (publishedVersions.length === 0) {
|
|
1727
1690
|
writeInfo(`\nā No published versions available for "${skillDetails.displayName}".`);
|
|
1728
|
-
writeInfo(
|
|
1691
|
+
writeInfo('š” Please contact the skill creator to publish a version.\n');
|
|
1729
1692
|
return;
|
|
1730
1693
|
}
|
|
1731
1694
|
// 4. Select version to install
|
|
1732
1695
|
const versionAnswer = await safePrompt([
|
|
1733
1696
|
{
|
|
1734
|
-
type:
|
|
1735
|
-
name:
|
|
1736
|
-
message:
|
|
1697
|
+
type: 'list',
|
|
1698
|
+
name: 'version',
|
|
1699
|
+
message: 'Select a version to install:',
|
|
1737
1700
|
choices: publishedVersions
|
|
1738
1701
|
.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime())
|
|
1739
1702
|
.map((v) => ({
|
|
1740
|
-
name: `v${v.version} - ${new Date(v.createdAt).toLocaleDateString()}${v.changelog ? ` - ${v.changelog}` :
|
|
1703
|
+
name: `v${v.version} - ${new Date(v.createdAt).toLocaleDateString()}${v.changelog ? ` - ${v.changelog}` : ''}`,
|
|
1741
1704
|
value: v,
|
|
1742
1705
|
})),
|
|
1743
1706
|
},
|
|
@@ -1749,18 +1712,18 @@ async function installMarketplaceSkill(marketplaceApi, config, apiKey) {
|
|
|
1749
1712
|
const envVarsConfig = {};
|
|
1750
1713
|
const versionEnvVars = selectedVersion.envVarsMetadata || {};
|
|
1751
1714
|
if (Object.keys(versionEnvVars).length > 0) {
|
|
1752
|
-
writeInfo(
|
|
1715
|
+
writeInfo('\nš Configure environment variables:\n');
|
|
1753
1716
|
for (const [key, meta] of Object.entries(versionEnvVars)) {
|
|
1754
1717
|
const varMeta = meta;
|
|
1755
1718
|
const isRequired = varMeta.required;
|
|
1756
|
-
const description = varMeta.description ||
|
|
1757
|
-
const example = varMeta.example ? ` (e.g., ${varMeta.example})` :
|
|
1758
|
-
console.log(`\n${key}${isRequired ?
|
|
1719
|
+
const description = varMeta.description || 'No description';
|
|
1720
|
+
const example = varMeta.example ? ` (e.g., ${varMeta.example})` : '';
|
|
1721
|
+
console.log(`\n${key}${isRequired ? ' (required)' : ' (optional)'}`);
|
|
1759
1722
|
console.log(` ${description}${example}`);
|
|
1760
1723
|
const valueAnswer = await safePrompt([
|
|
1761
1724
|
{
|
|
1762
|
-
type:
|
|
1763
|
-
name:
|
|
1725
|
+
type: 'input',
|
|
1726
|
+
name: 'value',
|
|
1764
1727
|
message: `Enter value for ${key}:`,
|
|
1765
1728
|
validate: (input) => {
|
|
1766
1729
|
if (isRequired && !input.trim()) {
|
|
@@ -1771,7 +1734,7 @@ async function installMarketplaceSkill(marketplaceApi, config, apiKey) {
|
|
|
1771
1734
|
},
|
|
1772
1735
|
]);
|
|
1773
1736
|
if (valueAnswer === null) {
|
|
1774
|
-
writeInfo(
|
|
1737
|
+
writeInfo('\nā Installation cancelled.\n');
|
|
1775
1738
|
return;
|
|
1776
1739
|
}
|
|
1777
1740
|
if (valueAnswer.value && valueAnswer.value.trim()) {
|
|
@@ -1780,7 +1743,7 @@ async function installMarketplaceSkill(marketplaceApi, config, apiKey) {
|
|
|
1780
1743
|
}
|
|
1781
1744
|
}
|
|
1782
1745
|
// 6. Confirm installation
|
|
1783
|
-
console.log(
|
|
1746
|
+
console.log('\nš Installation Summary:');
|
|
1784
1747
|
console.log(` Skill: ${skillDetails.displayName}`);
|
|
1785
1748
|
console.log(` Version: v${selectedVersion.version}`);
|
|
1786
1749
|
console.log(` Agent: ${agentId}`);
|
|
@@ -1789,18 +1752,18 @@ async function installMarketplaceSkill(marketplaceApi, config, apiKey) {
|
|
|
1789
1752
|
}
|
|
1790
1753
|
const confirmAnswer = await safePrompt([
|
|
1791
1754
|
{
|
|
1792
|
-
type:
|
|
1793
|
-
name:
|
|
1794
|
-
message:
|
|
1755
|
+
type: 'confirm',
|
|
1756
|
+
name: 'confirm',
|
|
1757
|
+
message: 'Proceed with installation?',
|
|
1795
1758
|
default: true,
|
|
1796
1759
|
},
|
|
1797
1760
|
]);
|
|
1798
1761
|
if (!confirmAnswer || !confirmAnswer.confirm) {
|
|
1799
|
-
writeInfo(
|
|
1762
|
+
writeInfo('\nā Installation cancelled.\n');
|
|
1800
1763
|
return;
|
|
1801
1764
|
}
|
|
1802
1765
|
// 7. Install the skill
|
|
1803
|
-
writeProgress(
|
|
1766
|
+
writeProgress('\nš Installing skill...');
|
|
1804
1767
|
const installPayload = {
|
|
1805
1768
|
versionId: selectedVersion.id,
|
|
1806
1769
|
envVars: Object.keys(envVarsConfig).length > 0 ? envVarsConfig : undefined,
|
|
@@ -1820,25 +1783,25 @@ async function updateInstalledSkill(marketplaceApi, config, apiKey) {
|
|
|
1820
1783
|
try {
|
|
1821
1784
|
const agentId = config.agent?.agentId;
|
|
1822
1785
|
if (!agentId) {
|
|
1823
|
-
console.error(
|
|
1786
|
+
console.error('\nā No agent ID found in configuration.\n');
|
|
1824
1787
|
return;
|
|
1825
1788
|
}
|
|
1826
1789
|
// 1. Fetch installed skills
|
|
1827
1790
|
writeProgress(`\nš Loading installed marketplace skills...`);
|
|
1828
1791
|
const installedSkills = await marketplaceApi.getInstalledSkills(agentId);
|
|
1829
1792
|
if (!installedSkills || installedSkills.length === 0) {
|
|
1830
|
-
writeInfo(
|
|
1793
|
+
writeInfo('\nš¦ No marketplace skills installed on this agent yet.');
|
|
1831
1794
|
writeInfo("š” Use 'Install a skill' to get started.\n");
|
|
1832
1795
|
return;
|
|
1833
1796
|
}
|
|
1834
1797
|
// 2. Select which installed skill to update
|
|
1835
1798
|
const skillAnswer = await safePrompt([
|
|
1836
1799
|
{
|
|
1837
|
-
type:
|
|
1838
|
-
name:
|
|
1839
|
-
message:
|
|
1800
|
+
type: 'list',
|
|
1801
|
+
name: 'skill',
|
|
1802
|
+
message: 'Which installed skill would you like to update?',
|
|
1840
1803
|
choices: installedSkills.map((s) => ({
|
|
1841
|
-
name: `${s.title || s.name} (currently v${s.activeVersionId ||
|
|
1804
|
+
name: `${s.title || s.name} (currently v${s.activeVersionId || 'unknown'})`,
|
|
1842
1805
|
value: s,
|
|
1843
1806
|
})),
|
|
1844
1807
|
},
|
|
@@ -1849,53 +1812,50 @@ async function updateInstalledSkill(marketplaceApi, config, apiKey) {
|
|
|
1849
1812
|
// 3. Choose what to update
|
|
1850
1813
|
const updateChoiceAnswer = await safePrompt([
|
|
1851
1814
|
{
|
|
1852
|
-
type:
|
|
1853
|
-
name:
|
|
1854
|
-
message:
|
|
1815
|
+
type: 'list',
|
|
1816
|
+
name: 'choice',
|
|
1817
|
+
message: 'What would you like to update?',
|
|
1855
1818
|
choices: [
|
|
1856
|
-
{ name:
|
|
1857
|
-
{ name:
|
|
1819
|
+
{ name: 'Upgrade to a different version', value: 'version' },
|
|
1820
|
+
{ name: 'Update environment variables', value: 'envVars' },
|
|
1858
1821
|
{
|
|
1859
|
-
name:
|
|
1860
|
-
value:
|
|
1822
|
+
name: 'Update both version and environment variables',
|
|
1823
|
+
value: 'both',
|
|
1861
1824
|
},
|
|
1862
|
-
{ name:
|
|
1825
|
+
{ name: 'Cancel', value: 'cancel' },
|
|
1863
1826
|
],
|
|
1864
1827
|
},
|
|
1865
1828
|
]);
|
|
1866
|
-
if (!updateChoiceAnswer || updateChoiceAnswer.choice ===
|
|
1829
|
+
if (!updateChoiceAnswer || updateChoiceAnswer.choice === 'cancel') {
|
|
1867
1830
|
return;
|
|
1868
1831
|
}
|
|
1869
1832
|
const updateChoice = updateChoiceAnswer.choice;
|
|
1870
1833
|
let newVersionId = undefined;
|
|
1871
1834
|
let newEnvVars = undefined;
|
|
1872
1835
|
// 4. Handle version update
|
|
1873
|
-
if (updateChoice ===
|
|
1836
|
+
if (updateChoice === 'version' || updateChoice === 'both') {
|
|
1874
1837
|
// Fetch skill details to get available versions
|
|
1875
1838
|
writeProgress(`\nš Loading available versions...`);
|
|
1876
1839
|
const marketplaceSkillId = installedSkill.marketplaceSkillId;
|
|
1877
1840
|
if (!marketplaceSkillId) {
|
|
1878
|
-
console.error(
|
|
1841
|
+
console.error('\nā Skill is missing marketplace skill ID.\n');
|
|
1879
1842
|
return;
|
|
1880
1843
|
}
|
|
1881
1844
|
const versions = await marketplaceApi.getSkillVersions(marketplaceSkillId);
|
|
1882
1845
|
const publishedVersions = (versions || []).filter((v) => v.published);
|
|
1883
1846
|
if (publishedVersions.length === 0) {
|
|
1884
|
-
writeInfo(
|
|
1847
|
+
writeInfo('\nā No published versions available for this skill.\n');
|
|
1885
1848
|
return;
|
|
1886
1849
|
}
|
|
1887
1850
|
const versionAnswer = await safePrompt([
|
|
1888
1851
|
{
|
|
1889
|
-
type:
|
|
1890
|
-
name:
|
|
1891
|
-
message:
|
|
1852
|
+
type: 'list',
|
|
1853
|
+
name: 'version',
|
|
1854
|
+
message: 'Select a version to upgrade to:',
|
|
1892
1855
|
choices: publishedVersions
|
|
1893
1856
|
.sort((a, b) => compareVersions(b.version, a.version))
|
|
1894
1857
|
.map((v) => ({
|
|
1895
|
-
name: `v${v.version}${v.id ===
|
|
1896
|
-
installedSkill.marketplaceInstallMetadata?.installedVersionId
|
|
1897
|
-
? " (current)"
|
|
1898
|
-
: ""} - ${new Date(v.createdAt).toLocaleDateString()}${v.changelog ? ` - ${v.changelog}` : ""}`,
|
|
1858
|
+
name: `v${v.version}${v.id === installedSkill.marketplaceInstallMetadata?.installedVersionId ? ' (current)' : ''} - ${new Date(v.createdAt).toLocaleDateString()}${v.changelog ? ` - ${v.changelog}` : ''}`,
|
|
1899
1859
|
value: v,
|
|
1900
1860
|
})),
|
|
1901
1861
|
},
|
|
@@ -1905,7 +1865,7 @@ async function updateInstalledSkill(marketplaceApi, config, apiKey) {
|
|
|
1905
1865
|
newVersionId = versionAnswer.version.id;
|
|
1906
1866
|
}
|
|
1907
1867
|
// 5. Handle environment variables update
|
|
1908
|
-
if (updateChoice ===
|
|
1868
|
+
if (updateChoice === 'envVars' || updateChoice === 'both') {
|
|
1909
1869
|
// Fetch current agent environment variables
|
|
1910
1870
|
let currentAgentEnvVars = {};
|
|
1911
1871
|
try {
|
|
@@ -1920,7 +1880,7 @@ async function updateInstalledSkill(marketplaceApi, config, apiKey) {
|
|
|
1920
1880
|
}
|
|
1921
1881
|
const marketplaceSkillId = installedSkill.marketplaceSkillId;
|
|
1922
1882
|
if (!marketplaceSkillId) {
|
|
1923
|
-
console.error(
|
|
1883
|
+
console.error('\nā Skill is missing marketplace skill ID.\n');
|
|
1924
1884
|
return;
|
|
1925
1885
|
}
|
|
1926
1886
|
const skillDetails = await marketplaceApi.getSkillById(marketplaceSkillId);
|
|
@@ -1932,44 +1892,40 @@ async function updateInstalledSkill(marketplaceApi, config, apiKey) {
|
|
|
1932
1892
|
}
|
|
1933
1893
|
else if (installedSkill.marketplaceInstallMetadata?.installedVersionId) {
|
|
1934
1894
|
// Use the currently installed version
|
|
1935
|
-
targetVersion = skillDetails.versions?.find((v) => v.id ===
|
|
1936
|
-
installedSkill.marketplaceInstallMetadata.installedVersionId);
|
|
1895
|
+
targetVersion = skillDetails.versions?.find((v) => v.id === installedSkill.marketplaceInstallMetadata.installedVersionId);
|
|
1937
1896
|
}
|
|
1938
1897
|
// Fallback to latest version if not found (shouldn't happen usually)
|
|
1939
|
-
if (!targetVersion &&
|
|
1940
|
-
skillDetails.versions &&
|
|
1941
|
-
skillDetails.versions.length > 0) {
|
|
1898
|
+
if (!targetVersion && skillDetails.versions && skillDetails.versions.length > 0) {
|
|
1942
1899
|
targetVersion = skillDetails.versions.sort((a, b) => compareVersions(b.version, a.version))[0];
|
|
1943
1900
|
}
|
|
1944
1901
|
const envVarsMetadata = targetVersion?.envVarsMetadata || {};
|
|
1945
1902
|
if (Object.keys(envVarsMetadata).length === 0) {
|
|
1946
|
-
writeInfo(
|
|
1947
|
-
if (updateChoice ===
|
|
1903
|
+
writeInfo('\nš This version has no environment variables to configure.\n');
|
|
1904
|
+
if (updateChoice === 'envVars') {
|
|
1948
1905
|
return; // Nothing to update
|
|
1949
1906
|
}
|
|
1950
1907
|
}
|
|
1951
1908
|
else {
|
|
1952
|
-
writeInfo(
|
|
1909
|
+
writeInfo('\nš Update environment variables:\n');
|
|
1953
1910
|
const updatedEnvVars = {};
|
|
1954
1911
|
for (const [key, meta] of Object.entries(envVarsMetadata)) {
|
|
1955
1912
|
const varMeta = meta;
|
|
1956
1913
|
const isRequired = varMeta.required;
|
|
1957
|
-
const description = varMeta.description ||
|
|
1958
|
-
const example = varMeta.example ? ` (e.g., ${varMeta.example})` :
|
|
1959
|
-
const currentValue = currentAgentEnvVars[key] ||
|
|
1960
|
-
console.log(`\n${key}${isRequired ?
|
|
1914
|
+
const description = varMeta.description || 'No description';
|
|
1915
|
+
const example = varMeta.example ? ` (e.g., ${varMeta.example})` : '';
|
|
1916
|
+
const currentValue = currentAgentEnvVars[key] || '';
|
|
1917
|
+
console.log(`\n${key}${isRequired ? ' (required)' : ' (optional)'}`);
|
|
1961
1918
|
console.log(` ${description}${example}`);
|
|
1962
1919
|
if (currentValue) {
|
|
1963
1920
|
const maskedValue = currentValue.length > 4
|
|
1964
|
-
? currentValue.substring(0, 4) +
|
|
1965
|
-
|
|
1966
|
-
: "*".repeat(currentValue.length);
|
|
1921
|
+
? currentValue.substring(0, 4) + '*'.repeat(Math.min(currentValue.length - 4, 20))
|
|
1922
|
+
: '*'.repeat(currentValue.length);
|
|
1967
1923
|
console.log(` Current value: ${maskedValue}`);
|
|
1968
1924
|
}
|
|
1969
1925
|
const valueAnswer = await safePrompt([
|
|
1970
1926
|
{
|
|
1971
|
-
type:
|
|
1972
|
-
name:
|
|
1927
|
+
type: 'input',
|
|
1928
|
+
name: 'value',
|
|
1973
1929
|
message: `Enter new value for ${key} (leave empty to keep current):`,
|
|
1974
1930
|
default: currentValue,
|
|
1975
1931
|
validate: (input) => {
|
|
@@ -1981,12 +1937,10 @@ async function updateInstalledSkill(marketplaceApi, config, apiKey) {
|
|
|
1981
1937
|
},
|
|
1982
1938
|
]);
|
|
1983
1939
|
if (valueAnswer === null) {
|
|
1984
|
-
writeInfo(
|
|
1940
|
+
writeInfo('\nā Update cancelled.\n');
|
|
1985
1941
|
return;
|
|
1986
1942
|
}
|
|
1987
|
-
if (valueAnswer.value &&
|
|
1988
|
-
valueAnswer.value.trim() &&
|
|
1989
|
-
valueAnswer.value !== currentValue) {
|
|
1943
|
+
if (valueAnswer.value && valueAnswer.value.trim() && valueAnswer.value !== currentValue) {
|
|
1990
1944
|
updatedEnvVars[key] = valueAnswer.value.trim();
|
|
1991
1945
|
}
|
|
1992
1946
|
}
|
|
@@ -1994,7 +1948,7 @@ async function updateInstalledSkill(marketplaceApi, config, apiKey) {
|
|
|
1994
1948
|
}
|
|
1995
1949
|
}
|
|
1996
1950
|
// 6. Confirm update
|
|
1997
|
-
console.log(
|
|
1951
|
+
console.log('\nš Update Summary:');
|
|
1998
1952
|
console.log(` Skill: ${installedSkill.title || installedSkill.name}`);
|
|
1999
1953
|
console.log(` Agent: ${agentId}`);
|
|
2000
1954
|
if (newVersionId) {
|
|
@@ -2005,18 +1959,18 @@ async function updateInstalledSkill(marketplaceApi, config, apiKey) {
|
|
|
2005
1959
|
}
|
|
2006
1960
|
const confirmAnswer = await safePrompt([
|
|
2007
1961
|
{
|
|
2008
|
-
type:
|
|
2009
|
-
name:
|
|
2010
|
-
message:
|
|
1962
|
+
type: 'confirm',
|
|
1963
|
+
name: 'confirm',
|
|
1964
|
+
message: 'Proceed with update?',
|
|
2011
1965
|
default: true,
|
|
2012
1966
|
},
|
|
2013
1967
|
]);
|
|
2014
1968
|
if (!confirmAnswer || !confirmAnswer.confirm) {
|
|
2015
|
-
writeInfo(
|
|
1969
|
+
writeInfo('\nā Update cancelled.\n');
|
|
2016
1970
|
return;
|
|
2017
1971
|
}
|
|
2018
1972
|
// 7. Update the skill
|
|
2019
|
-
writeProgress(
|
|
1973
|
+
writeProgress('\nš Updating installed skill...');
|
|
2020
1974
|
const updatePayload = {};
|
|
2021
1975
|
if (newVersionId) {
|
|
2022
1976
|
updatePayload.versionId = newVersionId;
|
|
@@ -2025,7 +1979,7 @@ async function updateInstalledSkill(marketplaceApi, config, apiKey) {
|
|
|
2025
1979
|
updatePayload.envVars = newEnvVars;
|
|
2026
1980
|
}
|
|
2027
1981
|
if (!installedSkill.marketplaceSkillId) {
|
|
2028
|
-
console.error(
|
|
1982
|
+
console.error('\nā Skill is missing marketplace skill ID.\n');
|
|
2029
1983
|
return;
|
|
2030
1984
|
}
|
|
2031
1985
|
await marketplaceApi.updateInstallation(installedSkill.marketplaceSkillId, agentId, updatePayload);
|
|
@@ -2043,25 +1997,25 @@ async function uninstallMarketplaceSkill(marketplaceApi, config) {
|
|
|
2043
1997
|
try {
|
|
2044
1998
|
const agentId = config.agent?.agentId;
|
|
2045
1999
|
if (!agentId) {
|
|
2046
|
-
console.error(
|
|
2000
|
+
console.error('\nā No agent ID found in configuration.\n');
|
|
2047
2001
|
return;
|
|
2048
2002
|
}
|
|
2049
2003
|
// 1. Fetch installed skills
|
|
2050
2004
|
writeProgress(`\nš Loading installed marketplace skills...`);
|
|
2051
2005
|
const installedSkills = await marketplaceApi.getInstalledSkills(agentId);
|
|
2052
2006
|
if (!installedSkills || installedSkills.length === 0) {
|
|
2053
|
-
writeInfo(
|
|
2007
|
+
writeInfo('\nš¦ No marketplace skills installed on this agent yet.');
|
|
2054
2008
|
writeInfo("š” Use 'Install a skill' to get started.\n");
|
|
2055
2009
|
return;
|
|
2056
2010
|
}
|
|
2057
2011
|
// 2. Select which installed skill to uninstall
|
|
2058
2012
|
const skillAnswer = await safePrompt([
|
|
2059
2013
|
{
|
|
2060
|
-
type:
|
|
2061
|
-
name:
|
|
2062
|
-
message:
|
|
2014
|
+
type: 'list',
|
|
2015
|
+
name: 'skill',
|
|
2016
|
+
message: 'Which skill would you like to uninstall?',
|
|
2063
2017
|
choices: installedSkills.map((s) => ({
|
|
2064
|
-
name: `${s.title || s.name} (v${s.activeVersionId ||
|
|
2018
|
+
name: `${s.title || s.name} (v${s.activeVersionId || 'unknown'})`,
|
|
2065
2019
|
value: s,
|
|
2066
2020
|
})),
|
|
2067
2021
|
},
|
|
@@ -2072,22 +2026,22 @@ async function uninstallMarketplaceSkill(marketplaceApi, config) {
|
|
|
2072
2026
|
// 3. Confirm uninstallation
|
|
2073
2027
|
const confirmAnswer = await safePrompt([
|
|
2074
2028
|
{
|
|
2075
|
-
type:
|
|
2076
|
-
name:
|
|
2029
|
+
type: 'confirm',
|
|
2030
|
+
name: 'confirm',
|
|
2077
2031
|
message: `ā ļø Are you sure you want to uninstall "${installedSkill.title || installedSkill.name}"?`,
|
|
2078
2032
|
default: false,
|
|
2079
2033
|
},
|
|
2080
2034
|
]);
|
|
2081
2035
|
if (!confirmAnswer || !confirmAnswer.confirm) {
|
|
2082
|
-
writeInfo(
|
|
2036
|
+
writeInfo('\nā Uninstall cancelled.\n');
|
|
2083
2037
|
return;
|
|
2084
2038
|
}
|
|
2085
2039
|
if (!installedSkill.marketplaceSkillId) {
|
|
2086
|
-
console.error(
|
|
2040
|
+
console.error('\nā Skill is missing marketplace skill ID.\n');
|
|
2087
2041
|
return;
|
|
2088
2042
|
}
|
|
2089
2043
|
// 4. Uninstall the skill
|
|
2090
|
-
writeProgress(
|
|
2044
|
+
writeProgress('\nš Uninstalling skill...');
|
|
2091
2045
|
await marketplaceApi.uninstallSkill(installedSkill.marketplaceSkillId, agentId);
|
|
2092
2046
|
writeSuccess(`\nā
"${installedSkill.title || installedSkill.name}" has been uninstalled successfully!`);
|
|
2093
2047
|
writeInfo(`š” The skill has been removed from agent ${agentId}.\n`);
|
|
@@ -2103,18 +2057,18 @@ async function listInstalledSkills(marketplaceApi, config) {
|
|
|
2103
2057
|
try {
|
|
2104
2058
|
const agentId = config.agent?.agentId;
|
|
2105
2059
|
if (!agentId) {
|
|
2106
|
-
console.error(
|
|
2060
|
+
console.error('\nā No agent ID found in configuration.\n');
|
|
2107
2061
|
return;
|
|
2108
2062
|
}
|
|
2109
|
-
writeProgress(
|
|
2063
|
+
writeProgress('\nš Loading installed marketplace skills...\n');
|
|
2110
2064
|
const installedSkills = await marketplaceApi.getInstalledSkills(agentId);
|
|
2111
2065
|
if (!installedSkills || installedSkills.length === 0) {
|
|
2112
|
-
writeInfo(
|
|
2066
|
+
writeInfo('\nš¦ No marketplace skills installed on this agent yet.');
|
|
2113
2067
|
writeInfo("š” Use 'Install a skill' to browse and install skills.\n");
|
|
2114
2068
|
return;
|
|
2115
2069
|
}
|
|
2116
2070
|
// Display summary
|
|
2117
|
-
console.log(`\nš You have ${installedSkills.length} marketplace skill${installedSkills.length === 1 ?
|
|
2071
|
+
console.log(`\nš You have ${installedSkills.length} marketplace skill${installedSkills.length === 1 ? '' : 's'} installed:\n`);
|
|
2118
2072
|
// Display each installed skill
|
|
2119
2073
|
for (const skill of installedSkills) {
|
|
2120
2074
|
console.log(`š¦ ${skill.title || skill.name}`);
|
|
@@ -2133,14 +2087,14 @@ async function listInstalledSkills(marketplaceApi, config) {
|
|
|
2133
2087
|
if (skill.marketplaceInstallMetadata?.installedBy) {
|
|
2134
2088
|
console.log(` Installed By: ${skill.marketplaceInstallMetadata.installedBy}`);
|
|
2135
2089
|
}
|
|
2136
|
-
console.log(
|
|
2090
|
+
console.log(''); // Empty line between skills
|
|
2137
2091
|
}
|
|
2138
2092
|
// Prompt to continue
|
|
2139
2093
|
await safePrompt([
|
|
2140
2094
|
{
|
|
2141
|
-
type:
|
|
2142
|
-
name:
|
|
2143
|
-
message:
|
|
2095
|
+
type: 'input',
|
|
2096
|
+
name: 'continue',
|
|
2097
|
+
message: 'Press Enter to continue...',
|
|
2144
2098
|
},
|
|
2145
2099
|
]);
|
|
2146
2100
|
}
|