@skillsmith/cli 0.7.1 → 0.7.3
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/CHANGELOG.md +9 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/cli.js +44039 -0
- package/package.json +21 -11
- package/dist/src/commands/__meta__/telemetry-coverage.test.d.ts +0 -20
- package/dist/src/commands/__meta__/telemetry-coverage.test.d.ts.map +0 -1
- package/dist/src/commands/__meta__/telemetry-coverage.test.js +0 -118
- package/dist/src/commands/__meta__/telemetry-coverage.test.js.map +0 -1
- package/dist/src/commands/ab-test.d.ts +0 -29
- package/dist/src/commands/ab-test.d.ts.map +0 -1
- package/dist/src/commands/ab-test.js +0 -226
- package/dist/src/commands/ab-test.js.map +0 -1
- package/dist/src/commands/ab-test.test.d.ts +0 -7
- package/dist/src/commands/ab-test.test.d.ts.map +0 -1
- package/dist/src/commands/ab-test.test.js +0 -255
- package/dist/src/commands/ab-test.test.js.map +0 -1
- package/dist/src/commands/analyze.d.ts +0 -14
- package/dist/src/commands/analyze.d.ts.map +0 -1
- package/dist/src/commands/analyze.js +0 -191
- package/dist/src/commands/analyze.js.map +0 -1
- package/dist/src/commands/audit-collisions.d.ts +0 -68
- package/dist/src/commands/audit-collisions.d.ts.map +0 -1
- package/dist/src/commands/audit-collisions.js +0 -309
- package/dist/src/commands/audit-collisions.js.map +0 -1
- package/dist/src/commands/audit-sources.action.d.ts +0 -37
- package/dist/src/commands/audit-sources.action.d.ts.map +0 -1
- package/dist/src/commands/audit-sources.action.js +0 -321
- package/dist/src/commands/audit-sources.action.js.map +0 -1
- package/dist/src/commands/audit-sources.d.ts +0 -37
- package/dist/src/commands/audit-sources.d.ts.map +0 -1
- package/dist/src/commands/audit-sources.js +0 -55
- package/dist/src/commands/audit-sources.js.map +0 -1
- package/dist/src/commands/audit-sources.test.d.ts +0 -9
- package/dist/src/commands/audit-sources.test.d.ts.map +0 -1
- package/dist/src/commands/audit-sources.test.js +0 -228
- package/dist/src/commands/audit-sources.test.js.map +0 -1
- package/dist/src/commands/audit.d.ts +0 -40
- package/dist/src/commands/audit.d.ts.map +0 -1
- package/dist/src/commands/audit.js +0 -223
- package/dist/src/commands/audit.js.map +0 -1
- package/dist/src/commands/audit.test.d.ts +0 -8
- package/dist/src/commands/audit.test.d.ts.map +0 -1
- package/dist/src/commands/audit.test.js +0 -97
- package/dist/src/commands/audit.test.js.map +0 -1
- package/dist/src/commands/author/index.d.ts +0 -17
- package/dist/src/commands/author/index.d.ts.map +0 -1
- package/dist/src/commands/author/index.js +0 -21
- package/dist/src/commands/author/index.js.map +0 -1
- package/dist/src/commands/author/init.action.d.ts +0 -29
- package/dist/src/commands/author/init.action.d.ts.map +0 -1
- package/dist/src/commands/author/init.action.js +0 -131
- package/dist/src/commands/author/init.action.js.map +0 -1
- package/dist/src/commands/author/init.d.ts +0 -36
- package/dist/src/commands/author/init.d.ts.map +0 -1
- package/dist/src/commands/author/init.helpers.d.ts +0 -80
- package/dist/src/commands/author/init.helpers.d.ts.map +0 -1
- package/dist/src/commands/author/init.helpers.js +0 -107
- package/dist/src/commands/author/init.helpers.js.map +0 -1
- package/dist/src/commands/author/init.js +0 -320
- package/dist/src/commands/author/init.js.map +0 -1
- package/dist/src/commands/author/mcp-init.d.ts +0 -21
- package/dist/src/commands/author/mcp-init.d.ts.map +0 -1
- package/dist/src/commands/author/mcp-init.js +0 -202
- package/dist/src/commands/author/mcp-init.js.map +0 -1
- package/dist/src/commands/author/subagent.d.ts +0 -23
- package/dist/src/commands/author/subagent.d.ts.map +0 -1
- package/dist/src/commands/author/subagent.js +0 -174
- package/dist/src/commands/author/subagent.js.map +0 -1
- package/dist/src/commands/author/transform.d.ts +0 -23
- package/dist/src/commands/author/transform.d.ts.map +0 -1
- package/dist/src/commands/author/transform.js +0 -149
- package/dist/src/commands/author/transform.js.map +0 -1
- package/dist/src/commands/author/utils.d.ts +0 -27
- package/dist/src/commands/author/utils.d.ts.map +0 -1
- package/dist/src/commands/author/utils.js +0 -118
- package/dist/src/commands/author/utils.js.map +0 -1
- package/dist/src/commands/config.d.ts +0 -57
- package/dist/src/commands/config.d.ts.map +0 -1
- package/dist/src/commands/config.js +0 -226
- package/dist/src/commands/config.js.map +0 -1
- package/dist/src/commands/create.d.ts +0 -43
- package/dist/src/commands/create.d.ts.map +0 -1
- package/dist/src/commands/create.js +0 -336
- package/dist/src/commands/create.js.map +0 -1
- package/dist/src/commands/diff.d.ts +0 -21
- package/dist/src/commands/diff.d.ts.map +0 -1
- package/dist/src/commands/diff.js +0 -227
- package/dist/src/commands/diff.js.map +0 -1
- package/dist/src/commands/diff.test.d.ts +0 -6
- package/dist/src/commands/diff.test.d.ts.map +0 -1
- package/dist/src/commands/diff.test.js +0 -327
- package/dist/src/commands/diff.test.js.map +0 -1
- package/dist/src/commands/import-local.d.ts +0 -28
- package/dist/src/commands/import-local.d.ts.map +0 -1
- package/dist/src/commands/import-local.helpers.d.ts +0 -28
- package/dist/src/commands/import-local.helpers.d.ts.map +0 -1
- package/dist/src/commands/import-local.helpers.js +0 -166
- package/dist/src/commands/import-local.helpers.js.map +0 -1
- package/dist/src/commands/import-local.js +0 -273
- package/dist/src/commands/import-local.js.map +0 -1
- package/dist/src/commands/import-local.types.d.ts +0 -59
- package/dist/src/commands/import-local.types.d.ts.map +0 -1
- package/dist/src/commands/import-local.types.js +0 -2
- package/dist/src/commands/import-local.types.js.map +0 -1
- package/dist/src/commands/import.d.ts +0 -47
- package/dist/src/commands/import.d.ts.map +0 -1
- package/dist/src/commands/import.js +0 -314
- package/dist/src/commands/import.js.map +0 -1
- package/dist/src/commands/index.d.ts +0 -28
- package/dist/src/commands/index.d.ts.map +0 -1
- package/dist/src/commands/index.js +0 -50
- package/dist/src/commands/index.js.map +0 -1
- package/dist/src/commands/info.d.ts +0 -19
- package/dist/src/commands/info.d.ts.map +0 -1
- package/dist/src/commands/info.js +0 -110
- package/dist/src/commands/info.js.map +0 -1
- package/dist/src/commands/install-skill.d.ts +0 -16
- package/dist/src/commands/install-skill.d.ts.map +0 -1
- package/dist/src/commands/install-skill.js +0 -155
- package/dist/src/commands/install-skill.js.map +0 -1
- package/dist/src/commands/install.d.ts +0 -34
- package/dist/src/commands/install.d.ts.map +0 -1
- package/dist/src/commands/install.js +0 -311
- package/dist/src/commands/install.js.map +0 -1
- package/dist/src/commands/inventory.action.d.ts +0 -55
- package/dist/src/commands/inventory.action.d.ts.map +0 -1
- package/dist/src/commands/inventory.action.js +0 -179
- package/dist/src/commands/inventory.action.js.map +0 -1
- package/dist/src/commands/inventory.action.test.d.ts +0 -19
- package/dist/src/commands/inventory.action.test.d.ts.map +0 -1
- package/dist/src/commands/inventory.action.test.js +0 -371
- package/dist/src/commands/inventory.action.test.js.map +0 -1
- package/dist/src/commands/inventory.d.ts +0 -21
- package/dist/src/commands/inventory.d.ts.map +0 -1
- package/dist/src/commands/inventory.js +0 -42
- package/dist/src/commands/inventory.js.map +0 -1
- package/dist/src/commands/login.d.ts +0 -7
- package/dist/src/commands/login.d.ts.map +0 -1
- package/dist/src/commands/login.js +0 -323
- package/dist/src/commands/login.js.map +0 -1
- package/dist/src/commands/login.test-helpers.d.ts +0 -7
- package/dist/src/commands/login.test-helpers.d.ts.map +0 -1
- package/dist/src/commands/login.test-helpers.js +0 -44
- package/dist/src/commands/login.test-helpers.js.map +0 -1
- package/dist/src/commands/login.test.d.ts +0 -2
- package/dist/src/commands/login.test.d.ts.map +0 -1
- package/dist/src/commands/login.test.js +0 -387
- package/dist/src/commands/login.test.js.map +0 -1
- package/dist/src/commands/logout.d.ts +0 -15
- package/dist/src/commands/logout.d.ts.map +0 -1
- package/dist/src/commands/logout.js +0 -54
- package/dist/src/commands/logout.js.map +0 -1
- package/dist/src/commands/logout.test.d.ts +0 -8
- package/dist/src/commands/logout.test.d.ts.map +0 -1
- package/dist/src/commands/logout.test.js +0 -137
- package/dist/src/commands/logout.test.js.map +0 -1
- package/dist/src/commands/manage.d.ts +0 -19
- package/dist/src/commands/manage.d.ts.map +0 -1
- package/dist/src/commands/manage.js +0 -346
- package/dist/src/commands/manage.js.map +0 -1
- package/dist/src/commands/merge.d.ts +0 -24
- package/dist/src/commands/merge.d.ts.map +0 -1
- package/dist/src/commands/merge.js +0 -168
- package/dist/src/commands/merge.js.map +0 -1
- package/dist/src/commands/pin.d.ts +0 -26
- package/dist/src/commands/pin.d.ts.map +0 -1
- package/dist/src/commands/pin.js +0 -138
- package/dist/src/commands/pin.js.map +0 -1
- package/dist/src/commands/pin.test.d.ts +0 -6
- package/dist/src/commands/pin.test.d.ts.map +0 -1
- package/dist/src/commands/pin.test.js +0 -206
- package/dist/src/commands/pin.test.js.map +0 -1
- package/dist/src/commands/recommend-scoring.d.ts +0 -29
- package/dist/src/commands/recommend-scoring.d.ts.map +0 -1
- package/dist/src/commands/recommend-scoring.js +0 -141
- package/dist/src/commands/recommend-scoring.js.map +0 -1
- package/dist/src/commands/recommend.d.ts +0 -15
- package/dist/src/commands/recommend.d.ts.map +0 -1
- package/dist/src/commands/recommend.helpers.d.ts +0 -44
- package/dist/src/commands/recommend.helpers.d.ts.map +0 -1
- package/dist/src/commands/recommend.helpers.js +0 -303
- package/dist/src/commands/recommend.helpers.js.map +0 -1
- package/dist/src/commands/recommend.js +0 -198
- package/dist/src/commands/recommend.js.map +0 -1
- package/dist/src/commands/recommend.types.d.ts +0 -66
- package/dist/src/commands/recommend.types.d.ts.map +0 -1
- package/dist/src/commands/recommend.types.js +0 -14
- package/dist/src/commands/recommend.types.js.map +0 -1
- package/dist/src/commands/run-registry-sync.d.ts +0 -31
- package/dist/src/commands/run-registry-sync.d.ts.map +0 -1
- package/dist/src/commands/run-registry-sync.js +0 -45
- package/dist/src/commands/run-registry-sync.js.map +0 -1
- package/dist/src/commands/search-formatters.d.ts +0 -36
- package/dist/src/commands/search-formatters.d.ts.map +0 -1
- package/dist/src/commands/search-formatters.js +0 -132
- package/dist/src/commands/search-formatters.js.map +0 -1
- package/dist/src/commands/search-types.d.ts +0 -46
- package/dist/src/commands/search-types.d.ts.map +0 -1
- package/dist/src/commands/search-types.js +0 -12
- package/dist/src/commands/search-types.js.map +0 -1
- package/dist/src/commands/search.action.d.ts +0 -16
- package/dist/src/commands/search.action.d.ts.map +0 -1
- package/dist/src/commands/search.action.js +0 -384
- package/dist/src/commands/search.action.js.map +0 -1
- package/dist/src/commands/search.d.ts +0 -18
- package/dist/src/commands/search.d.ts.map +0 -1
- package/dist/src/commands/search.helpers.d.ts +0 -52
- package/dist/src/commands/search.helpers.d.ts.map +0 -1
- package/dist/src/commands/search.helpers.js +0 -95
- package/dist/src/commands/search.helpers.js.map +0 -1
- package/dist/src/commands/search.js +0 -48
- package/dist/src/commands/search.js.map +0 -1
- package/dist/src/commands/search.test.d.ts +0 -10
- package/dist/src/commands/search.test.d.ts.map +0 -1
- package/dist/src/commands/search.test.js +0 -179
- package/dist/src/commands/search.test.js.map +0 -1
- package/dist/src/commands/sync.action.d.ts +0 -39
- package/dist/src/commands/sync.action.d.ts.map +0 -1
- package/dist/src/commands/sync.action.js +0 -353
- package/dist/src/commands/sync.action.js.map +0 -1
- package/dist/src/commands/sync.d.ts +0 -24
- package/dist/src/commands/sync.d.ts.map +0 -1
- package/dist/src/commands/sync.helpers.d.ts +0 -55
- package/dist/src/commands/sync.helpers.d.ts.map +0 -1
- package/dist/src/commands/sync.helpers.js +0 -90
- package/dist/src/commands/sync.helpers.js.map +0 -1
- package/dist/src/commands/sync.js +0 -101
- package/dist/src/commands/sync.js.map +0 -1
- package/dist/src/commands/telemetry.action.d.ts +0 -38
- package/dist/src/commands/telemetry.action.d.ts.map +0 -1
- package/dist/src/commands/telemetry.action.js +0 -350
- package/dist/src/commands/telemetry.action.js.map +0 -1
- package/dist/src/commands/telemetry.d.ts +0 -30
- package/dist/src/commands/telemetry.d.ts.map +0 -1
- package/dist/src/commands/telemetry.helpers.d.ts +0 -58
- package/dist/src/commands/telemetry.helpers.d.ts.map +0 -1
- package/dist/src/commands/telemetry.helpers.js +0 -173
- package/dist/src/commands/telemetry.helpers.js.map +0 -1
- package/dist/src/commands/telemetry.helpers.test.d.ts +0 -15
- package/dist/src/commands/telemetry.helpers.test.d.ts.map +0 -1
- package/dist/src/commands/telemetry.helpers.test.js +0 -240
- package/dist/src/commands/telemetry.helpers.test.js.map +0 -1
- package/dist/src/commands/telemetry.js +0 -65
- package/dist/src/commands/telemetry.js.map +0 -1
- package/dist/src/commands/telemetry.test.d.ts +0 -18
- package/dist/src/commands/telemetry.test.d.ts.map +0 -1
- package/dist/src/commands/telemetry.test.js +0 -401
- package/dist/src/commands/telemetry.test.js.map +0 -1
- package/dist/src/commands/whoami.d.ts +0 -15
- package/dist/src/commands/whoami.d.ts.map +0 -1
- package/dist/src/commands/whoami.js +0 -55
- package/dist/src/commands/whoami.js.map +0 -1
- package/dist/src/commands/whoami.test.d.ts +0 -8
- package/dist/src/commands/whoami.test.d.ts.map +0 -1
- package/dist/src/commands/whoami.test.js +0 -133
- package/dist/src/commands/whoami.test.js.map +0 -1
- package/dist/src/config.d.ts +0 -29
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -34
- package/dist/src/config.js.map +0 -1
- package/dist/src/index.d.ts +0 -22
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -117
- package/dist/src/index.js.map +0 -1
- package/dist/src/templates/changelog.md.template.d.ts +0 -8
- package/dist/src/templates/changelog.md.template.d.ts.map +0 -1
- package/dist/src/templates/changelog.md.template.js +0 -19
- package/dist/src/templates/changelog.md.template.js.map +0 -1
- package/dist/src/templates/index.d.ts +0 -11
- package/dist/src/templates/index.d.ts.map +0 -1
- package/dist/src/templates/index.js +0 -11
- package/dist/src/templates/index.js.map +0 -1
- package/dist/src/templates/mcp-server.template.d.ts +0 -82
- package/dist/src/templates/mcp-server.template.d.ts.map +0 -1
- package/dist/src/templates/mcp-server.template.js +0 -430
- package/dist/src/templates/mcp-server.template.js.map +0 -1
- package/dist/src/templates/mcp-server.template.snippets.d.ts +0 -51
- package/dist/src/templates/mcp-server.template.snippets.d.ts.map +0 -1
- package/dist/src/templates/mcp-server.template.snippets.js +0 -162
- package/dist/src/templates/mcp-server.template.snippets.js.map +0 -1
- package/dist/src/templates/mcp-template-handlers.d.ts +0 -33
- package/dist/src/templates/mcp-template-handlers.d.ts.map +0 -1
- package/dist/src/templates/mcp-template-handlers.js +0 -106
- package/dist/src/templates/mcp-template-handlers.js.map +0 -1
- package/dist/src/templates/mcp-template-types.d.ts +0 -48
- package/dist/src/templates/mcp-template-types.d.ts.map +0 -1
- package/dist/src/templates/mcp-template-types.js +0 -18
- package/dist/src/templates/mcp-template-types.js.map +0 -1
- package/dist/src/templates/readme.md.template.d.ts +0 -8
- package/dist/src/templates/readme.md.template.d.ts.map +0 -1
- package/dist/src/templates/readme.md.template.js +0 -86
- package/dist/src/templates/readme.md.template.js.map +0 -1
- package/dist/src/templates/skill.md.template.d.ts +0 -8
- package/dist/src/templates/skill.md.template.d.ts.map +0 -1
- package/dist/src/templates/skill.md.template.js +0 -97
- package/dist/src/templates/skill.md.template.js.map +0 -1
- package/dist/src/templates/subagent.md.template.d.ts +0 -38
- package/dist/src/templates/subagent.md.template.d.ts.map +0 -1
- package/dist/src/templates/subagent.md.template.js +0 -128
- package/dist/src/templates/subagent.md.template.js.map +0 -1
- package/dist/src/utils/errors.d.ts +0 -52
- package/dist/src/utils/errors.d.ts.map +0 -1
- package/dist/src/utils/errors.js +0 -58
- package/dist/src/utils/errors.js.map +0 -1
- package/dist/src/utils/formatters.d.ts +0 -39
- package/dist/src/utils/formatters.d.ts.map +0 -1
- package/dist/src/utils/formatters.js +0 -69
- package/dist/src/utils/formatters.js.map +0 -1
- package/dist/src/utils/license-types.d.ts +0 -88
- package/dist/src/utils/license-types.d.ts.map +0 -1
- package/dist/src/utils/license-types.js +0 -60
- package/dist/src/utils/license-types.js.map +0 -1
- package/dist/src/utils/license-validation.d.ts +0 -61
- package/dist/src/utils/license-validation.d.ts.map +0 -1
- package/dist/src/utils/license-validation.js +0 -198
- package/dist/src/utils/license-validation.js.map +0 -1
- package/dist/src/utils/license.d.ts +0 -56
- package/dist/src/utils/license.d.ts.map +0 -1
- package/dist/src/utils/license.js +0 -163
- package/dist/src/utils/license.js.map +0 -1
- package/dist/src/utils/license.test.d.ts +0 -7
- package/dist/src/utils/license.test.d.ts.map +0 -1
- package/dist/src/utils/license.test.js +0 -308
- package/dist/src/utils/license.test.js.map +0 -1
- package/dist/src/utils/manifest.d.ts +0 -121
- package/dist/src/utils/manifest.d.ts.map +0 -1
- package/dist/src/utils/manifest.js +0 -133
- package/dist/src/utils/manifest.js.map +0 -1
- package/dist/src/utils/manifest.test.d.ts +0 -20
- package/dist/src/utils/manifest.test.d.ts.map +0 -1
- package/dist/src/utils/manifest.test.js +0 -344
- package/dist/src/utils/manifest.test.js.map +0 -1
- package/dist/src/utils/node-version.d.ts +0 -41
- package/dist/src/utils/node-version.d.ts.map +0 -1
- package/dist/src/utils/node-version.js +0 -123
- package/dist/src/utils/node-version.js.map +0 -1
- package/dist/src/utils/open-database.d.ts +0 -35
- package/dist/src/utils/open-database.d.ts.map +0 -1
- package/dist/src/utils/open-database.js +0 -73
- package/dist/src/utils/open-database.js.map +0 -1
- package/dist/src/utils/require-tier.d.ts +0 -38
- package/dist/src/utils/require-tier.d.ts.map +0 -1
- package/dist/src/utils/require-tier.js +0 -74
- package/dist/src/utils/require-tier.js.map +0 -1
- package/dist/src/utils/sanitize.d.ts +0 -30
- package/dist/src/utils/sanitize.d.ts.map +0 -1
- package/dist/src/utils/sanitize.js +0 -45
- package/dist/src/utils/sanitize.js.map +0 -1
- package/dist/src/utils/skill-name.d.ts +0 -19
- package/dist/src/utils/skill-name.d.ts.map +0 -1
- package/dist/src/utils/skill-name.js +0 -26
- package/dist/src/utils/skill-name.js.map +0 -1
- package/dist/src/utils/skills-directory.d.ts +0 -95
- package/dist/src/utils/skills-directory.d.ts.map +0 -1
- package/dist/src/utils/skills-directory.js +0 -283
- package/dist/src/utils/skills-directory.js.map +0 -1
- package/dist/src/utils/startup-header-gate.d.ts +0 -29
- package/dist/src/utils/startup-header-gate.d.ts.map +0 -1
- package/dist/src/utils/startup-header-gate.js +0 -44
- package/dist/src/utils/startup-header-gate.js.map +0 -1
- package/dist/src/utils/startup-header-gate.test.d.ts +0 -2
- package/dist/src/utils/startup-header-gate.test.d.ts.map +0 -1
- package/dist/src/utils/startup-header-gate.test.js +0 -46
- package/dist/src/utils/startup-header-gate.test.js.map +0 -1
- package/dist/src/utils/tool-analyzer.d.ts +0 -54
- package/dist/src/utils/tool-analyzer.d.ts.map +0 -1
- package/dist/src/utils/tool-analyzer.js +0 -156
- package/dist/src/utils/tool-analyzer.js.map +0 -1
- package/dist/src/version.d.ts +0 -2
- package/dist/src/version.d.ts.map +0 -1
- package/dist/src/version.js +0 -24
- package/dist/src/version.js.map +0 -1
- package/dist/tests/audit-collisions.test.d.ts +0 -42
- package/dist/tests/audit-collisions.test.d.ts.map +0 -1
- package/dist/tests/audit-collisions.test.js +0 -370
- package/dist/tests/audit-collisions.test.js.map +0 -1
- package/dist/tests/audit-restructure.test.d.ts +0 -15
- package/dist/tests/audit-restructure.test.d.ts.map +0 -1
- package/dist/tests/audit-restructure.test.js +0 -151
- package/dist/tests/audit-restructure.test.js.map +0 -1
- package/dist/tests/author.test.d.ts +0 -5
- package/dist/tests/author.test.d.ts.map +0 -1
- package/dist/tests/author.test.js +0 -653
- package/dist/tests/author.test.js.map +0 -1
- package/dist/tests/config.test.d.ts +0 -33
- package/dist/tests/config.test.d.ts.map +0 -1
- package/dist/tests/config.test.js +0 -240
- package/dist/tests/config.test.js.map +0 -1
- package/dist/tests/create.test.d.ts +0 -5
- package/dist/tests/create.test.d.ts.map +0 -1
- package/dist/tests/create.test.js +0 -449
- package/dist/tests/create.test.js.map +0 -1
- package/dist/tests/e2e/audit-sources-affix.test.d.ts +0 -11
- package/dist/tests/e2e/audit-sources-affix.test.d.ts.map +0 -1
- package/dist/tests/e2e/audit-sources-affix.test.js +0 -121
- package/dist/tests/e2e/audit-sources-affix.test.js.map +0 -1
- package/dist/tests/e2e/audit-sources-apply.test.d.ts +0 -13
- package/dist/tests/e2e/audit-sources-apply.test.d.ts.map +0 -1
- package/dist/tests/e2e/audit-sources-apply.test.js +0 -166
- package/dist/tests/e2e/audit-sources-apply.test.js.map +0 -1
- package/dist/tests/e2e/audit-sources-recovery.test.d.ts +0 -15
- package/dist/tests/e2e/audit-sources-recovery.test.d.ts.map +0 -1
- package/dist/tests/e2e/audit-sources-recovery.test.js +0 -179
- package/dist/tests/e2e/audit-sources-recovery.test.js.map +0 -1
- package/dist/tests/e2e/audit-sources-roundtrip.test.d.ts +0 -23
- package/dist/tests/e2e/audit-sources-roundtrip.test.d.ts.map +0 -1
- package/dist/tests/e2e/audit-sources-roundtrip.test.js +0 -139
- package/dist/tests/e2e/audit-sources-roundtrip.test.js.map +0 -1
- package/dist/tests/e2e/author.e2e.test.d.ts +0 -9
- package/dist/tests/e2e/author.e2e.test.d.ts.map +0 -1
- package/dist/tests/e2e/author.e2e.test.js +0 -666
- package/dist/tests/e2e/author.e2e.test.js.map +0 -1
- package/dist/tests/e2e/import.e2e.test.d.ts +0 -10
- package/dist/tests/e2e/import.e2e.test.d.ts.map +0 -1
- package/dist/tests/e2e/import.e2e.test.js +0 -213
- package/dist/tests/e2e/import.e2e.test.js.map +0 -1
- package/dist/tests/e2e/manage.e2e.test.d.ts +0 -9
- package/dist/tests/e2e/manage.e2e.test.d.ts.map +0 -1
- package/dist/tests/e2e/manage.e2e.test.js +0 -277
- package/dist/tests/e2e/manage.e2e.test.js.map +0 -1
- package/dist/tests/e2e/search.e2e.test.d.ts +0 -10
- package/dist/tests/e2e/search.e2e.test.d.ts.map +0 -1
- package/dist/tests/e2e/search.e2e.test.js +0 -324
- package/dist/tests/e2e/search.e2e.test.js.map +0 -1
- package/dist/tests/e2e/test-config.d.ts +0 -39
- package/dist/tests/e2e/test-config.d.ts.map +0 -1
- package/dist/tests/e2e/test-config.js +0 -44
- package/dist/tests/e2e/test-config.js.map +0 -1
- package/dist/tests/e2e/utils/baseline-collector.d.ts +0 -107
- package/dist/tests/e2e/utils/baseline-collector.d.ts.map +0 -1
- package/dist/tests/e2e/utils/baseline-collector.js +0 -211
- package/dist/tests/e2e/utils/baseline-collector.js.map +0 -1
- package/dist/tests/e2e/utils/hardcoded-detector.d.ts +0 -46
- package/dist/tests/e2e/utils/hardcoded-detector.d.ts.map +0 -1
- package/dist/tests/e2e/utils/hardcoded-detector.js +0 -238
- package/dist/tests/e2e/utils/hardcoded-detector.js.map +0 -1
- package/dist/tests/e2e/utils/index.d.ts +0 -12
- package/dist/tests/e2e/utils/index.d.ts.map +0 -1
- package/dist/tests/e2e/utils/index.js +0 -12
- package/dist/tests/e2e/utils/index.js.map +0 -1
- package/dist/tests/e2e/utils/linear-reporter.d.ts +0 -60
- package/dist/tests/e2e/utils/linear-reporter.d.ts.map +0 -1
- package/dist/tests/e2e/utils/linear-reporter.js +0 -223
- package/dist/tests/e2e/utils/linear-reporter.js.map +0 -1
- package/dist/tests/e2e/utils/mock-github.d.ts +0 -23
- package/dist/tests/e2e/utils/mock-github.d.ts.map +0 -1
- package/dist/tests/e2e/utils/mock-github.js +0 -60
- package/dist/tests/e2e/utils/mock-github.js.map +0 -1
- package/dist/tests/e2e/utils/mock-prompts.d.ts +0 -19
- package/dist/tests/e2e/utils/mock-prompts.d.ts.map +0 -1
- package/dist/tests/e2e/utils/mock-prompts.js +0 -48
- package/dist/tests/e2e/utils/mock-prompts.js.map +0 -1
- package/dist/tests/e2e/utils/source-recovery-fixture.d.ts +0 -49
- package/dist/tests/e2e/utils/source-recovery-fixture.d.ts.map +0 -1
- package/dist/tests/e2e/utils/source-recovery-fixture.js +0 -106
- package/dist/tests/e2e/utils/source-recovery-fixture.js.map +0 -1
- package/dist/tests/embedding-probe-stdio.test.d.ts +0 -11
- package/dist/tests/embedding-probe-stdio.test.d.ts.map +0 -1
- package/dist/tests/embedding-probe-stdio.test.js +0 -58
- package/dist/tests/embedding-probe-stdio.test.js.map +0 -1
- package/dist/tests/import.test.d.ts +0 -5
- package/dist/tests/import.test.d.ts.map +0 -1
- package/dist/tests/import.test.js +0 -11
- package/dist/tests/import.test.js.map +0 -1
- package/dist/tests/init.test.d.ts +0 -30
- package/dist/tests/init.test.d.ts.map +0 -1
- package/dist/tests/init.test.js +0 -357
- package/dist/tests/init.test.js.map +0 -1
- package/dist/tests/install-multi-client.test.d.ts +0 -2
- package/dist/tests/install-multi-client.test.d.ts.map +0 -1
- package/dist/tests/install-multi-client.test.js +0 -202
- package/dist/tests/install-multi-client.test.js.map +0 -1
- package/dist/tests/install-quarantine.test.d.ts +0 -10
- package/dist/tests/install-quarantine.test.d.ts.map +0 -1
- package/dist/tests/install-quarantine.test.js +0 -86
- package/dist/tests/install-quarantine.test.js.map +0 -1
- package/dist/tests/install-skill.test.d.ts +0 -8
- package/dist/tests/install-skill.test.d.ts.map +0 -1
- package/dist/tests/install-skill.test.js +0 -414
- package/dist/tests/install-skill.test.js.map +0 -1
- package/dist/tests/integration/import-local.test.d.ts +0 -2
- package/dist/tests/integration/import-local.test.d.ts.map +0 -1
- package/dist/tests/integration/import-local.test.js +0 -158
- package/dist/tests/integration/import-local.test.js.map +0 -1
- package/dist/tests/license-validation.test.d.ts +0 -8
- package/dist/tests/license-validation.test.d.ts.map +0 -1
- package/dist/tests/license-validation.test.js +0 -186
- package/dist/tests/license-validation.test.js.map +0 -1
- package/dist/tests/manage.test.d.ts +0 -5
- package/dist/tests/manage.test.d.ts.map +0 -1
- package/dist/tests/manage.test.js +0 -495
- package/dist/tests/manage.test.js.map +0 -1
- package/dist/tests/mcp-server-template.test.d.ts +0 -7
- package/dist/tests/mcp-server-template.test.d.ts.map +0 -1
- package/dist/tests/mcp-server-template.test.js +0 -372
- package/dist/tests/mcp-server-template.test.js.map +0 -1
- package/dist/tests/node-version.test.d.ts +0 -8
- package/dist/tests/node-version.test.d.ts.map +0 -1
- package/dist/tests/node-version.test.js +0 -200
- package/dist/tests/node-version.test.js.map +0 -1
- package/dist/tests/open-database.test.d.ts +0 -2
- package/dist/tests/open-database.test.d.ts.map +0 -1
- package/dist/tests/open-database.test.js +0 -77
- package/dist/tests/open-database.test.js.map +0 -1
- package/dist/tests/recommend-helpers.test.d.ts +0 -9
- package/dist/tests/recommend-helpers.test.d.ts.map +0 -1
- package/dist/tests/recommend-helpers.test.js +0 -308
- package/dist/tests/recommend-helpers.test.js.map +0 -1
- package/dist/tests/recommend-scoring.test.d.ts +0 -8
- package/dist/tests/recommend-scoring.test.d.ts.map +0 -1
- package/dist/tests/recommend-scoring.test.js +0 -184
- package/dist/tests/recommend-scoring.test.js.map +0 -1
- package/dist/tests/recommend.errors.test.d.ts +0 -8
- package/dist/tests/recommend.errors.test.d.ts.map +0 -1
- package/dist/tests/recommend.errors.test.js +0 -232
- package/dist/tests/recommend.errors.test.js.map +0 -1
- package/dist/tests/recommend.filters.test.d.ts +0 -9
- package/dist/tests/recommend.filters.test.d.ts.map +0 -1
- package/dist/tests/recommend.filters.test.js +0 -235
- package/dist/tests/recommend.filters.test.js.map +0 -1
- package/dist/tests/recommend.test-helpers.d.ts +0 -66
- package/dist/tests/recommend.test-helpers.d.ts.map +0 -1
- package/dist/tests/recommend.test-helpers.js +0 -79
- package/dist/tests/recommend.test-helpers.js.map +0 -1
- package/dist/tests/recommend.test.d.ts +0 -11
- package/dist/tests/recommend.test.d.ts.map +0 -1
- package/dist/tests/recommend.test.js +0 -320
- package/dist/tests/recommend.test.js.map +0 -1
- package/dist/tests/search-helpers.test.d.ts +0 -2
- package/dist/tests/search-helpers.test.d.ts.map +0 -1
- package/dist/tests/search-helpers.test.js +0 -110
- package/dist/tests/search-helpers.test.js.map +0 -1
- package/dist/tests/search.test.d.ts +0 -5
- package/dist/tests/search.test.d.ts.map +0 -1
- package/dist/tests/search.test.js +0 -91
- package/dist/tests/search.test.js.map +0 -1
- package/dist/tests/skills-directory-per-harness.test.d.ts +0 -2
- package/dist/tests/skills-directory-per-harness.test.d.ts.map +0 -1
- package/dist/tests/skills-directory-per-harness.test.js +0 -116
- package/dist/tests/skills-directory-per-harness.test.js.map +0 -1
- package/dist/tests/skills-directory.test.d.ts +0 -2
- package/dist/tests/skills-directory.test.d.ts.map +0 -1
- package/dist/tests/skills-directory.test.js +0 -97
- package/dist/tests/skills-directory.test.js.map +0 -1
- package/dist/tests/sync.auth-ux.test.d.ts +0 -14
- package/dist/tests/sync.auth-ux.test.d.ts.map +0 -1
- package/dist/tests/sync.auth-ux.test.js +0 -148
- package/dist/tests/sync.auth-ux.test.js.map +0 -1
- package/dist/tests/tool-analyzer.test.d.ts +0 -8
- package/dist/tests/tool-analyzer.test.d.ts.map +0 -1
- package/dist/tests/tool-analyzer.test.js +0 -149
- package/dist/tests/tool-analyzer.test.js.map +0 -1
- package/dist/tests/unit/commands/install.test.d.ts +0 -7
- package/dist/tests/unit/commands/install.test.d.ts.map +0 -1
- package/dist/tests/unit/commands/install.test.js +0 -482
- package/dist/tests/unit/commands/install.test.js.map +0 -1
- package/dist/tests/unit/import-local.helpers.test.d.ts +0 -2
- package/dist/tests/unit/import-local.helpers.test.d.ts.map +0 -1
- package/dist/tests/unit/import-local.helpers.test.js +0 -96
- package/dist/tests/unit/import-local.helpers.test.js.map +0 -1
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SMI-1433: MCP Server Template Handlers
|
|
3
|
-
*
|
|
4
|
-
* Code generation helpers for MCP server scaffolding.
|
|
5
|
-
*
|
|
6
|
-
* @module mcp-template-handlers
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Escape single quotes in strings for safe template interpolation
|
|
10
|
-
*/
|
|
11
|
-
export function escapeQuotes(str) {
|
|
12
|
-
return str.replace(/\\/g, '\\\\').replace(/'/g, "\\'");
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Generate tool definition code for a single tool
|
|
16
|
-
*/
|
|
17
|
-
export function generateToolDefinition(tool, indent = ' ') {
|
|
18
|
-
const properties = [];
|
|
19
|
-
const required = [];
|
|
20
|
-
for (const param of tool.parameters || []) {
|
|
21
|
-
properties.push(`${indent} ${param.name}: {
|
|
22
|
-
${indent} type: '${param.type}',
|
|
23
|
-
${indent} description: '${escapeQuotes(param.description)}',
|
|
24
|
-
${indent} },`);
|
|
25
|
-
if (param.required) {
|
|
26
|
-
required.push(`'${param.name}'`);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
const propertiesStr = properties.length > 0 ? properties.join('\n') : '';
|
|
30
|
-
const requiredStr = required.length > 0 ? `\n${indent} required: [${required.join(', ')}],` : '';
|
|
31
|
-
return `${indent}{
|
|
32
|
-
${indent} name: '${escapeQuotes(tool.name)}',
|
|
33
|
-
${indent} description: '${escapeQuotes(tool.description)}',
|
|
34
|
-
${indent} inputSchema: {
|
|
35
|
-
${indent} type: 'object',
|
|
36
|
-
${indent} properties: {
|
|
37
|
-
${propertiesStr}
|
|
38
|
-
${indent} },${requiredStr}
|
|
39
|
-
${indent} },
|
|
40
|
-
${indent}},`;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Generate tool handler case for switch statement
|
|
44
|
-
*/
|
|
45
|
-
export function generateToolCase(tool) {
|
|
46
|
-
const handlerName = `handle${tool.name.charAt(0).toUpperCase()}${tool.name.slice(1).replace(/-/g, '')}Tool`;
|
|
47
|
-
const argsType = `${tool.name.charAt(0).toUpperCase()}${tool.name.slice(1).replace(/-/g, '')}ToolArgs`;
|
|
48
|
-
return ` case '${tool.name}':
|
|
49
|
-
return ${handlerName}(args as unknown as ${argsType})`;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Generate tool import statement
|
|
53
|
-
*/
|
|
54
|
-
export function generateToolImport(tool) {
|
|
55
|
-
const baseName = tool.name.charAt(0).toUpperCase() + tool.name.slice(1).replace(/-/g, '');
|
|
56
|
-
return `import { handle${baseName}Tool, type ${baseName}ToolArgs } from './${tool.name}.js'`;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Generate a stub implementation file for a custom tool
|
|
60
|
-
*/
|
|
61
|
-
export function generateToolImplementation(tool) {
|
|
62
|
-
const baseName = tool.name.charAt(0).toUpperCase() + tool.name.slice(1).replace(/-/g, '');
|
|
63
|
-
const params = tool.parameters || [];
|
|
64
|
-
// Generate TypeScript interface properties
|
|
65
|
-
const interfaceProps = params
|
|
66
|
-
.map((p) => {
|
|
67
|
-
const tsType = p.type === 'array' ? 'unknown[]' : p.type === 'object' ? 'Record<string, unknown>' : p.type;
|
|
68
|
-
return ` ${p.name}${p.required ? '' : '?'}: ${tsType}`;
|
|
69
|
-
})
|
|
70
|
-
.join('\n');
|
|
71
|
-
// Generate implementation placeholder
|
|
72
|
-
const returnPlaceholder = params.length > 0
|
|
73
|
-
? `\`${tool.name} called with: \${JSON.stringify({ ${params.map((p) => `${p.name}: args.${p.name}`).join(', ')} })}\``
|
|
74
|
-
: `'${tool.name} called'`;
|
|
75
|
-
return `/**
|
|
76
|
-
* ${baseName} Tool Implementation
|
|
77
|
-
*
|
|
78
|
-
* ${escapeQuotes(tool.description)}
|
|
79
|
-
* TODO: Implement your tool logic here.
|
|
80
|
-
*/
|
|
81
|
-
|
|
82
|
-
export interface ${baseName}ToolArgs {
|
|
83
|
-
${interfaceProps || ' // No parameters'}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export async function handle${baseName}Tool(args: ${baseName}ToolArgs): Promise<string> {
|
|
87
|
-
// TODO: Implement ${tool.name} logic
|
|
88
|
-
return ${returnPlaceholder}
|
|
89
|
-
}
|
|
90
|
-
`;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Generate tool documentation for README
|
|
94
|
-
*/
|
|
95
|
-
export function generateToolDocs(tools) {
|
|
96
|
-
if (tools.length === 0) {
|
|
97
|
-
return '- `example` - An example tool that echoes input';
|
|
98
|
-
}
|
|
99
|
-
return tools
|
|
100
|
-
.map((tool) => {
|
|
101
|
-
const params = tool.parameters?.map((p) => `\`${p.name}\``).join(', ') || 'none';
|
|
102
|
-
return `- \`${tool.name}\` - ${tool.description}\n - Parameters: ${params}`;
|
|
103
|
-
})
|
|
104
|
-
.join('\n');
|
|
105
|
-
}
|
|
106
|
-
//# sourceMappingURL=mcp-template-handlers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-template-handlers.js","sourceRoot":"","sources":["../../../src/templates/mcp-template-handlers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACxD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAuB,EAAE,SAAiB,IAAI;IACnF,MAAM,UAAU,GAAa,EAAE,CAAA;IAC/B,MAAM,QAAQ,GAAa,EAAE,CAAA;IAE7B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;QAC1C,UAAU,CAAC,IAAI,CAAC,GAAG,MAAM,SAAS,KAAK,CAAC,IAAI;EAC9C,MAAM,kBAAkB,KAAK,CAAC,IAAI;EAClC,MAAM,yBAAyB,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC;EAC9D,MAAM,UAAU,CAAC,CAAA;QACf,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACnB,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,GAAG,CAAC,CAAA;QAClC,CAAC;IACH,CAAC;IAED,MAAM,aAAa,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACxE,MAAM,WAAW,GACf,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,kBAAkB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAA;IAEjF,OAAO,GAAG,MAAM;EAChB,MAAM,YAAY,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;EACzC,MAAM,mBAAmB,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC;EACvD,MAAM;EACN,MAAM;EACN,MAAM;EACN,aAAa;EACb,MAAM,SAAS,WAAW;EAC1B,MAAM;EACN,MAAM,IAAI,CAAA;AACZ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAuB;IACtD,MAAM,WAAW,GAAG,SAAS,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAA;IAC3G,MAAM,QAAQ,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAA;IACtG,OAAO,aAAa,IAAI,CAAC,IAAI;eAChB,WAAW,uBAAuB,QAAQ,GAAG,CAAA;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAuB;IACxD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;IACzF,OAAO,kBAAkB,QAAQ,cAAc,QAAQ,sBAAsB,IAAI,CAAC,IAAI,MAAM,CAAA;AAC9F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CAAC,IAAuB;IAChE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;IACzF,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,IAAI,EAAE,CAAA;IAEpC,2CAA2C;IAC3C,MAAM,cAAc,GAAG,MAAM;SAC1B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,MAAM,MAAM,GACV,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;QAC7F,OAAO,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,MAAM,EAAE,CAAA;IACzD,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAA;IAEb,sCAAsC;IACtC,MAAM,iBAAiB,GACrB,MAAM,CAAC,MAAM,GAAG,CAAC;QACf,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,qCAAqC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ;QACtH,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,UAAU,CAAA;IAE7B,OAAO;KACJ,QAAQ;;KAER,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC;;;;mBAIhB,QAAQ;EACzB,cAAc,IAAI,oBAAoB;;;8BAGV,QAAQ,cAAc,QAAQ;uBACrC,IAAI,CAAC,IAAI;WACrB,iBAAiB;;CAE3B,CAAA;AACD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAA0B;IACzD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,iDAAiD,CAAA;IAC1D,CAAC;IAED,OAAO,KAAK;SACT,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACZ,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,CAAA;QAChF,OAAO,OAAO,IAAI,CAAC,IAAI,QAAQ,IAAI,CAAC,WAAW,qBAAqB,MAAM,EAAE,CAAA;IAC9E,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAA;AACf,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SMI-1433: MCP Server Template Types
|
|
3
|
-
*
|
|
4
|
-
* Type definitions for MCP server scaffolding.
|
|
5
|
-
*
|
|
6
|
-
* @module mcp-template-types
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Input data for rendering MCP server templates
|
|
10
|
-
*/
|
|
11
|
-
export interface McpServerTemplateData {
|
|
12
|
-
name: string;
|
|
13
|
-
description: string;
|
|
14
|
-
tools: McpToolDefinition[];
|
|
15
|
-
author: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Tool definition for MCP server
|
|
19
|
-
*/
|
|
20
|
-
export interface McpToolDefinition {
|
|
21
|
-
name: string;
|
|
22
|
-
description: string;
|
|
23
|
-
parameters?: McpParameterDefinition[];
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Parameter definition for MCP tool
|
|
27
|
-
*/
|
|
28
|
-
export interface McpParameterDefinition {
|
|
29
|
-
name: string;
|
|
30
|
-
type: 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
31
|
-
description: string;
|
|
32
|
-
required?: boolean;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Dependency version constants for easier maintenance
|
|
36
|
-
*/
|
|
37
|
-
export declare const VERSIONS: {
|
|
38
|
-
readonly MCP_SDK: "^1.0.0";
|
|
39
|
-
readonly TYPES_NODE: "^20.0.0";
|
|
40
|
-
readonly TSX: "^4.0.0";
|
|
41
|
-
readonly TYPESCRIPT: "^5.0.0";
|
|
42
|
-
readonly NODE_ENGINE: ">=18.0.0";
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Type for version keys
|
|
46
|
-
*/
|
|
47
|
-
export type VersionKey = keyof typeof VERSIONS;
|
|
48
|
-
//# sourceMappingURL=mcp-template-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-template-types.d.ts","sourceRoot":"","sources":["../../../src/templates/mcp-template-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,iBAAiB,EAAE,CAAA;IAC1B,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,sBAAsB,EAAE,CAAA;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAA;IAC1D,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;CAMX,CAAA;AAEV;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,QAAQ,CAAA"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SMI-1433: MCP Server Template Types
|
|
3
|
-
*
|
|
4
|
-
* Type definitions for MCP server scaffolding.
|
|
5
|
-
*
|
|
6
|
-
* @module mcp-template-types
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Dependency version constants for easier maintenance
|
|
10
|
-
*/
|
|
11
|
-
export const VERSIONS = {
|
|
12
|
-
MCP_SDK: '^1.0.0',
|
|
13
|
-
TYPES_NODE: '^20.0.0',
|
|
14
|
-
TSX: '^4.0.0',
|
|
15
|
-
TYPESCRIPT: '^5.0.0',
|
|
16
|
-
NODE_ENGINE: '>=18.0.0',
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=mcp-template-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-template-types.js","sourceRoot":"","sources":["../../../src/templates/mcp-template-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA+BH;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,OAAO,EAAE,QAAQ;IACjB,UAAU,EAAE,SAAS;IACrB,GAAG,EAAE,QAAQ;IACb,UAAU,EAAE,QAAQ;IACpB,WAAW,EAAE,UAAU;CACf,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* README.md Template
|
|
3
|
-
*
|
|
4
|
-
* Template for new skill README files.
|
|
5
|
-
*/
|
|
6
|
-
export declare const README_MD_TEMPLATE = "# {{name}}\n\n{{description}}\n\n## Overview\n\nThis is an agent skill (SKILL.md format, MCP-compatible) that provides [describe functionality].\n\n## Installation\n\n### Via Skillsmith\n\n```bash\nskillsmith install {{author}}/{{name}}\n```\n\n### Manual Installation\n\n1. Clone or download this repository\n2. Copy to your skills directory:\n\n```bash\ncp -r {{name}} ~/.claude/skills/\n```\n\n## Quick Start\n\n1. Install the skill\n2. Start your MCP-compatible agent (Claude Code, Cursor, Copilot, Codex, Windsurf, etc.)\n3. Use the skill by [describe how to trigger]\n\n## Documentation\n\nSee [SKILL.md](./SKILL.md) for detailed documentation.\n\n## Development\n\n### Prerequisites\n\n- Node.js 18+\n- npm or pnpm\n\n### Setup\n\n```bash\n# Install dependencies (if any)\nnpm install\n\n# Run tests\nnpm test\n```\n\n### Project Structure\n\n```\n{{name}}/\n\u251C\u2500\u2500 SKILL.md # Skill definition and documentation\n\u251C\u2500\u2500 README.md # This file\n\u251C\u2500\u2500 scripts/ # Automation scripts\n\u2502 \u2514\u2500\u2500 example.js # Example script\n\u251C\u2500\u2500 resources/ # Static resources\n\u2514\u2500\u2500 .gitignore # Git ignore rules\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Submit a pull request\n\n## License\n\nMIT License\n\n## Author\n\nCreated with [Skillsmith](https://github.com/skillsmith/skillsmith)\n";
|
|
7
|
-
export default README_MD_TEMPLATE;
|
|
8
|
-
//# sourceMappingURL=readme.md.template.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readme.md.template.d.ts","sourceRoot":"","sources":["../../../src/templates/readme.md.template.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,kBAAkB,47CA8E9B,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* README.md Template
|
|
3
|
-
*
|
|
4
|
-
* Template for new skill README files.
|
|
5
|
-
*/
|
|
6
|
-
export const README_MD_TEMPLATE = `# {{name}}
|
|
7
|
-
|
|
8
|
-
{{description}}
|
|
9
|
-
|
|
10
|
-
## Overview
|
|
11
|
-
|
|
12
|
-
This is an agent skill (SKILL.md format, MCP-compatible) that provides [describe functionality].
|
|
13
|
-
|
|
14
|
-
## Installation
|
|
15
|
-
|
|
16
|
-
### Via Skillsmith
|
|
17
|
-
|
|
18
|
-
\`\`\`bash
|
|
19
|
-
skillsmith install {{author}}/{{name}}
|
|
20
|
-
\`\`\`
|
|
21
|
-
|
|
22
|
-
### Manual Installation
|
|
23
|
-
|
|
24
|
-
1. Clone or download this repository
|
|
25
|
-
2. Copy to your skills directory:
|
|
26
|
-
|
|
27
|
-
\`\`\`bash
|
|
28
|
-
cp -r {{name}} ~/.claude/skills/
|
|
29
|
-
\`\`\`
|
|
30
|
-
|
|
31
|
-
## Quick Start
|
|
32
|
-
|
|
33
|
-
1. Install the skill
|
|
34
|
-
2. Start your MCP-compatible agent (Claude Code, Cursor, Copilot, Codex, Windsurf, etc.)
|
|
35
|
-
3. Use the skill by [describe how to trigger]
|
|
36
|
-
|
|
37
|
-
## Documentation
|
|
38
|
-
|
|
39
|
-
See [SKILL.md](./SKILL.md) for detailed documentation.
|
|
40
|
-
|
|
41
|
-
## Development
|
|
42
|
-
|
|
43
|
-
### Prerequisites
|
|
44
|
-
|
|
45
|
-
- Node.js 18+
|
|
46
|
-
- npm or pnpm
|
|
47
|
-
|
|
48
|
-
### Setup
|
|
49
|
-
|
|
50
|
-
\`\`\`bash
|
|
51
|
-
# Install dependencies (if any)
|
|
52
|
-
npm install
|
|
53
|
-
|
|
54
|
-
# Run tests
|
|
55
|
-
npm test
|
|
56
|
-
\`\`\`
|
|
57
|
-
|
|
58
|
-
### Project Structure
|
|
59
|
-
|
|
60
|
-
\`\`\`
|
|
61
|
-
{{name}}/
|
|
62
|
-
├── SKILL.md # Skill definition and documentation
|
|
63
|
-
├── README.md # This file
|
|
64
|
-
├── scripts/ # Automation scripts
|
|
65
|
-
│ └── example.js # Example script
|
|
66
|
-
├── resources/ # Static resources
|
|
67
|
-
└── .gitignore # Git ignore rules
|
|
68
|
-
\`\`\`
|
|
69
|
-
|
|
70
|
-
## Contributing
|
|
71
|
-
|
|
72
|
-
1. Fork the repository
|
|
73
|
-
2. Create a feature branch
|
|
74
|
-
3. Make your changes
|
|
75
|
-
4. Submit a pull request
|
|
76
|
-
|
|
77
|
-
## License
|
|
78
|
-
|
|
79
|
-
MIT License
|
|
80
|
-
|
|
81
|
-
## Author
|
|
82
|
-
|
|
83
|
-
Created with [Skillsmith](https://github.com/skillsmith/skillsmith)
|
|
84
|
-
`;
|
|
85
|
-
export default README_MD_TEMPLATE;
|
|
86
|
-
//# sourceMappingURL=readme.md.template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readme.md.template.js","sourceRoot":"","sources":["../../../src/templates/readme.md.template.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EjC,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SKILL.md Template
|
|
3
|
-
*
|
|
4
|
-
* Template for new skill SKILL.md files with YAML frontmatter.
|
|
5
|
-
*/
|
|
6
|
-
export declare const SKILL_MD_TEMPLATE = "---\nname: {{name}}\ndescription: {{description}}\nauthor: {{author}}\nversion: 1.0.0\ncategory: {{category}}\ntags:\n - claude-skill\n - {{category}}\nlicense: MIT\ncreated: {{date}}\n---\n\n# {{name}}\n\n{{description}}{{behavioralClassification}}## Features\n\n- Feature 1: Description of feature\n- Feature 2: Description of feature\n- Feature 3: Description of feature\n\n## Installation\n\n```bash\nskillsmith install {{author}}/{{name}}\n```\n\nOr manually:\n\n```bash\ncp -r . ~/.claude/skills/{{name}}\n```\n\n## Usage\n\n### Basic Usage\n\nDescribe how to use the skill with examples.\n\n### Commands\n\n| Command | Description |\n|---------|-------------|\n| `/example` | Description of example command |\n\n### Trigger Phrases\n\nThe skill responds to:\n- \"example phrase 1\"\n- \"example phrase 2\"\n\n## Configuration\n\n| Setting | Default | Description |\n|---------|---------|-------------|\n| `setting1` | `value` | Description |\n\n## Scripts\n\n### example.js\n\nLocated in `scripts/example.js`:\n\n```javascript\n// Your automation script here\n```\n\n## Resources\n\nFiles in the `resources/` directory:\n- `resource1.txt` - Description\n\n## Dependencies\n\nThis skill requires:\n- No external dependencies\n\n## Contributing\n\nContributions welcome! Please submit pull requests.\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Changelog\n\n### 1.0.0 ({{date}})\n- Initial release\n";
|
|
7
|
-
export default SKILL_MD_TEMPLATE;
|
|
8
|
-
//# sourceMappingURL=skill.md.template.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill.md.template.d.ts","sourceRoot":"","sources":["../../../src/templates/skill.md.template.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,iBAAiB,y5CAyF7B,CAAA;AAED,eAAe,iBAAiB,CAAA"}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SKILL.md Template
|
|
3
|
-
*
|
|
4
|
-
* Template for new skill SKILL.md files with YAML frontmatter.
|
|
5
|
-
*/
|
|
6
|
-
export const SKILL_MD_TEMPLATE = `---
|
|
7
|
-
name: {{name}}
|
|
8
|
-
description: {{description}}
|
|
9
|
-
author: {{author}}
|
|
10
|
-
version: 1.0.0
|
|
11
|
-
category: {{category}}
|
|
12
|
-
tags:
|
|
13
|
-
- claude-skill
|
|
14
|
-
- {{category}}
|
|
15
|
-
license: MIT
|
|
16
|
-
created: {{date}}
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
# {{name}}
|
|
20
|
-
|
|
21
|
-
{{description}}{{behavioralClassification}}## Features
|
|
22
|
-
|
|
23
|
-
- Feature 1: Description of feature
|
|
24
|
-
- Feature 2: Description of feature
|
|
25
|
-
- Feature 3: Description of feature
|
|
26
|
-
|
|
27
|
-
## Installation
|
|
28
|
-
|
|
29
|
-
\`\`\`bash
|
|
30
|
-
skillsmith install {{author}}/{{name}}
|
|
31
|
-
\`\`\`
|
|
32
|
-
|
|
33
|
-
Or manually:
|
|
34
|
-
|
|
35
|
-
\`\`\`bash
|
|
36
|
-
cp -r . ~/.claude/skills/{{name}}
|
|
37
|
-
\`\`\`
|
|
38
|
-
|
|
39
|
-
## Usage
|
|
40
|
-
|
|
41
|
-
### Basic Usage
|
|
42
|
-
|
|
43
|
-
Describe how to use the skill with examples.
|
|
44
|
-
|
|
45
|
-
### Commands
|
|
46
|
-
|
|
47
|
-
| Command | Description |
|
|
48
|
-
|---------|-------------|
|
|
49
|
-
| \`/example\` | Description of example command |
|
|
50
|
-
|
|
51
|
-
### Trigger Phrases
|
|
52
|
-
|
|
53
|
-
The skill responds to:
|
|
54
|
-
- "example phrase 1"
|
|
55
|
-
- "example phrase 2"
|
|
56
|
-
|
|
57
|
-
## Configuration
|
|
58
|
-
|
|
59
|
-
| Setting | Default | Description |
|
|
60
|
-
|---------|---------|-------------|
|
|
61
|
-
| \`setting1\` | \`value\` | Description |
|
|
62
|
-
|
|
63
|
-
## Scripts
|
|
64
|
-
|
|
65
|
-
### example.js
|
|
66
|
-
|
|
67
|
-
Located in \`scripts/example.js\`:
|
|
68
|
-
|
|
69
|
-
\`\`\`javascript
|
|
70
|
-
// Your automation script here
|
|
71
|
-
\`\`\`
|
|
72
|
-
|
|
73
|
-
## Resources
|
|
74
|
-
|
|
75
|
-
Files in the \`resources/\` directory:
|
|
76
|
-
- \`resource1.txt\` - Description
|
|
77
|
-
|
|
78
|
-
## Dependencies
|
|
79
|
-
|
|
80
|
-
This skill requires:
|
|
81
|
-
- No external dependencies
|
|
82
|
-
|
|
83
|
-
## Contributing
|
|
84
|
-
|
|
85
|
-
Contributions welcome! Please submit pull requests.
|
|
86
|
-
|
|
87
|
-
## License
|
|
88
|
-
|
|
89
|
-
MIT License - see LICENSE file for details.
|
|
90
|
-
|
|
91
|
-
## Changelog
|
|
92
|
-
|
|
93
|
-
### 1.0.0 ({{date}})
|
|
94
|
-
- Initial release
|
|
95
|
-
`;
|
|
96
|
-
export default SKILL_MD_TEMPLATE;
|
|
97
|
-
//# sourceMappingURL=skill.md.template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill.md.template.js","sourceRoot":"","sources":["../../../src/templates/skill.md.template.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFhC,CAAA;AAED,eAAe,iBAAiB,CAAA"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SMI-1389: Subagent Definition Template
|
|
3
|
-
*
|
|
4
|
-
* Templates for generating companion specialist agents that enable
|
|
5
|
-
* parallel skill execution with 37-97% token savings.
|
|
6
|
-
*/
|
|
7
|
-
export interface SubagentTemplateData {
|
|
8
|
-
skillName: string;
|
|
9
|
-
description: string;
|
|
10
|
-
triggerPhrases: string[];
|
|
11
|
-
tools: string[];
|
|
12
|
-
model: 'sonnet' | 'opus' | 'haiku';
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Main subagent definition template
|
|
16
|
-
* Generates ~/.claude/agents/[skill-name]-specialist.md
|
|
17
|
-
*/
|
|
18
|
-
export declare const SUBAGENT_MD_TEMPLATE = "---\nname: {{skillName}}-specialist\ndescription: {{description}} Use when {{triggerPhrases}}.\nskills: {{skillName}}\ntools: {{tools}}\nmodel: {{model}}\n---\n\n## Operating Protocol\n\n1. Execute the {{skillName}} skill for the delegated task\n2. Process all intermediate results internally\n3. Return ONLY a structured summary to the orchestrator\n\n## Output Format\n\n- **Task:** [what was requested]\n- **Actions:** [what you did]\n- **Results:** [key outcomes, max 3-5 bullet points]\n- **Artifacts:** [file paths or outputs created]\n\nKeep response under 500 tokens unless explicitly requested otherwise.\n\n## Tool Usage Guidelines\n\n{{toolGuidelines}}\n\n## Error Handling\n\nIf the task cannot be completed:\n- Report specific blocking issue\n- Suggest alternative approaches\n- Do not retry indefinitely\n";
|
|
19
|
-
/**
|
|
20
|
-
* CLAUDE.md integration snippet template
|
|
21
|
-
* Users can copy this to their project's CLAUDE.md
|
|
22
|
-
*/
|
|
23
|
-
export declare const CLAUDE_MD_SNIPPET_TEMPLATE = "\n### Subagent Delegation: {{skillName}}\n\nWhen tasks match {{skillName}} triggers, delegate to the {{skillName}}-specialist\nsubagent instead of executing directly. This provides context isolation and\n~37-97% token savings.\n\n**Trigger Patterns:**\n{{triggerPatterns}}\n\n**Delegation Example:**\n```\nTask(\"{{skillName}}-specialist\", \"{{exampleTask}}\", \"{{skillName}}-specialist\")\n```\n";
|
|
24
|
-
/**
|
|
25
|
-
* Render the subagent definition template
|
|
26
|
-
*
|
|
27
|
-
* @param data - Template data including skill name, description, tools, etc.
|
|
28
|
-
* @returns Rendered subagent markdown content
|
|
29
|
-
*/
|
|
30
|
-
export declare function renderSubagentTemplate(data: SubagentTemplateData): string;
|
|
31
|
-
/**
|
|
32
|
-
* Render the CLAUDE.md integration snippet
|
|
33
|
-
*
|
|
34
|
-
* @param data - Template data
|
|
35
|
-
* @returns Rendered CLAUDE.md snippet
|
|
36
|
-
*/
|
|
37
|
-
export declare function renderClaudeMdSnippet(data: SubagentTemplateData): string;
|
|
38
|
-
//# sourceMappingURL=subagent.md.template.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subagent.md.template.d.ts","sourceRoot":"","sources":["../../../src/templates/subagent.md.template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;CACnC;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,wzBAiChC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,0BAA0B,mZActC,CAAA;AAoCD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM,CAazE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM,CAYxE"}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SMI-1389: Subagent Definition Template
|
|
3
|
-
*
|
|
4
|
-
* Templates for generating companion specialist agents that enable
|
|
5
|
-
* parallel skill execution with 37-97% token savings.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Main subagent definition template
|
|
9
|
-
* Generates ~/.claude/agents/[skill-name]-specialist.md
|
|
10
|
-
*/
|
|
11
|
-
export const SUBAGENT_MD_TEMPLATE = `---
|
|
12
|
-
name: {{skillName}}-specialist
|
|
13
|
-
description: {{description}} Use when {{triggerPhrases}}.
|
|
14
|
-
skills: {{skillName}}
|
|
15
|
-
tools: {{tools}}
|
|
16
|
-
model: {{model}}
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Operating Protocol
|
|
20
|
-
|
|
21
|
-
1. Execute the {{skillName}} skill for the delegated task
|
|
22
|
-
2. Process all intermediate results internally
|
|
23
|
-
3. Return ONLY a structured summary to the orchestrator
|
|
24
|
-
|
|
25
|
-
## Output Format
|
|
26
|
-
|
|
27
|
-
- **Task:** [what was requested]
|
|
28
|
-
- **Actions:** [what you did]
|
|
29
|
-
- **Results:** [key outcomes, max 3-5 bullet points]
|
|
30
|
-
- **Artifacts:** [file paths or outputs created]
|
|
31
|
-
|
|
32
|
-
Keep response under 500 tokens unless explicitly requested otherwise.
|
|
33
|
-
|
|
34
|
-
## Tool Usage Guidelines
|
|
35
|
-
|
|
36
|
-
{{toolGuidelines}}
|
|
37
|
-
|
|
38
|
-
## Error Handling
|
|
39
|
-
|
|
40
|
-
If the task cannot be completed:
|
|
41
|
-
- Report specific blocking issue
|
|
42
|
-
- Suggest alternative approaches
|
|
43
|
-
- Do not retry indefinitely
|
|
44
|
-
`;
|
|
45
|
-
/**
|
|
46
|
-
* CLAUDE.md integration snippet template
|
|
47
|
-
* Users can copy this to their project's CLAUDE.md
|
|
48
|
-
*/
|
|
49
|
-
export const CLAUDE_MD_SNIPPET_TEMPLATE = `
|
|
50
|
-
### Subagent Delegation: {{skillName}}
|
|
51
|
-
|
|
52
|
-
When tasks match {{skillName}} triggers, delegate to the {{skillName}}-specialist
|
|
53
|
-
subagent instead of executing directly. This provides context isolation and
|
|
54
|
-
~37-97% token savings.
|
|
55
|
-
|
|
56
|
-
**Trigger Patterns:**
|
|
57
|
-
{{triggerPatterns}}
|
|
58
|
-
|
|
59
|
-
**Delegation Example:**
|
|
60
|
-
\`\`\`
|
|
61
|
-
Task("{{skillName}}-specialist", "{{exampleTask}}", "{{skillName}}-specialist")
|
|
62
|
-
\`\`\`
|
|
63
|
-
`;
|
|
64
|
-
/**
|
|
65
|
-
* Generate tool usage guidelines based on detected tools
|
|
66
|
-
*/
|
|
67
|
-
function generateToolGuidelines(tools) {
|
|
68
|
-
const guidelines = [];
|
|
69
|
-
if (tools.includes('Read')) {
|
|
70
|
-
guidelines.push('- **Read**: Use to examine files before modifications');
|
|
71
|
-
}
|
|
72
|
-
if (tools.includes('Write')) {
|
|
73
|
-
guidelines.push('- **Write**: Use for creating new files only');
|
|
74
|
-
}
|
|
75
|
-
if (tools.includes('Edit')) {
|
|
76
|
-
guidelines.push('- **Edit**: Use for modifying existing files');
|
|
77
|
-
}
|
|
78
|
-
if (tools.includes('Bash')) {
|
|
79
|
-
guidelines.push('- **Bash**: Use for command execution, prefer non-destructive commands');
|
|
80
|
-
}
|
|
81
|
-
if (tools.includes('Grep')) {
|
|
82
|
-
guidelines.push('- **Grep**: Use for searching file contents');
|
|
83
|
-
}
|
|
84
|
-
if (tools.includes('Glob')) {
|
|
85
|
-
guidelines.push('- **Glob**: Use for finding files by pattern');
|
|
86
|
-
}
|
|
87
|
-
if (tools.includes('WebFetch')) {
|
|
88
|
-
guidelines.push('- **WebFetch**: Use for fetching web content');
|
|
89
|
-
}
|
|
90
|
-
if (tools.includes('WebSearch')) {
|
|
91
|
-
guidelines.push('- **WebSearch**: Use for searching the web');
|
|
92
|
-
}
|
|
93
|
-
return guidelines.length > 0 ? guidelines.join('\n') : '- Use tools minimally and efficiently';
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Render the subagent definition template
|
|
97
|
-
*
|
|
98
|
-
* @param data - Template data including skill name, description, tools, etc.
|
|
99
|
-
* @returns Rendered subagent markdown content
|
|
100
|
-
*/
|
|
101
|
-
export function renderSubagentTemplate(data) {
|
|
102
|
-
const toolGuidelines = generateToolGuidelines(data.tools);
|
|
103
|
-
const triggerPhrasesFormatted = data.triggerPhrases.length > 0
|
|
104
|
-
? data.triggerPhrases.map((p) => `"${p}"`).join(', ')
|
|
105
|
-
: '[describe trigger conditions]';
|
|
106
|
-
return SUBAGENT_MD_TEMPLATE.replace(/\{\{skillName\}\}/g, data.skillName)
|
|
107
|
-
.replace(/\{\{description\}\}/g, data.description)
|
|
108
|
-
.replace(/\{\{triggerPhrases\}\}/g, triggerPhrasesFormatted)
|
|
109
|
-
.replace(/\{\{tools\}\}/g, data.tools.join(', '))
|
|
110
|
-
.replace(/\{\{model\}\}/g, data.model)
|
|
111
|
-
.replace(/\{\{toolGuidelines\}\}/g, toolGuidelines);
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Render the CLAUDE.md integration snippet
|
|
115
|
-
*
|
|
116
|
-
* @param data - Template data
|
|
117
|
-
* @returns Rendered CLAUDE.md snippet
|
|
118
|
-
*/
|
|
119
|
-
export function renderClaudeMdSnippet(data) {
|
|
120
|
-
const triggerPatterns = data.triggerPhrases.length > 0
|
|
121
|
-
? data.triggerPhrases.map((p) => `- "${p}"`).join('\n')
|
|
122
|
-
: '- [add trigger patterns]';
|
|
123
|
-
const exampleTask = data.triggerPhrases.length > 0 ? `${data.triggerPhrases[0]}` : `execute ${data.skillName} task`;
|
|
124
|
-
return CLAUDE_MD_SNIPPET_TEMPLATE.replace(/\{\{skillName\}\}/g, data.skillName)
|
|
125
|
-
.replace(/\{\{triggerPatterns\}\}/g, triggerPatterns)
|
|
126
|
-
.replace(/\{\{exampleTask\}\}/g, exampleTask);
|
|
127
|
-
}
|
|
128
|
-
//# sourceMappingURL=subagent.md.template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subagent.md.template.js","sourceRoot":"","sources":["../../../src/templates/subagent.md.template.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SMI-4314: Typed CLI error classes.
|
|
3
|
-
*
|
|
4
|
-
* Library-style command implementations (e.g. `initSkill`) must not call
|
|
5
|
-
* `process.exit` directly. Instead, they throw a typed error carrying the
|
|
6
|
-
* user-facing message and intended exit code. The command-action wrapper
|
|
7
|
-
* catches the typed error, prints the message exactly once, and exits with
|
|
8
|
-
* the requested code. Any other thrown `Error` is treated as an unexpected
|
|
9
|
-
* bug and routed through `sanitizeError` with exit code 1.
|
|
10
|
-
*
|
|
11
|
-
* Keeping the process.exit layer inside the wrapper — rather than inside the
|
|
12
|
-
* library function — prevents the "double-error-print" hazard that
|
|
13
|
-
* `init.helpers.ts` previously had to work around, and lets tests assert on
|
|
14
|
-
* `rejects.toBeInstanceOf(InitSkillError)` instead of monkey-patching
|
|
15
|
-
* `process.exit`.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Error thrown by `initSkill` (and related author-init helpers) when an
|
|
19
|
-
* expected user-facing failure occurs — e.g. invalid skill name, invalid
|
|
20
|
-
* category, or filesystem setup failure.
|
|
21
|
-
*
|
|
22
|
-
* The `message` is intended to be user-facing: it is printed to stderr by
|
|
23
|
-
* the command-action wrapper and already carries any ANSI styling from the
|
|
24
|
-
* call site (e.g. `chalk.red(...)`). Callers should therefore not re-wrap
|
|
25
|
-
* the message with another `chalk.red`/"Error:" prefix.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* throw new InitSkillError(chalk.red(`Invalid skill name: ${name}`))
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* try {
|
|
32
|
-
* await initSkill(name, targetPath, opts)
|
|
33
|
-
* } catch (err) {
|
|
34
|
-
* if (err instanceof InitSkillError) {
|
|
35
|
-
* console.error(err.message)
|
|
36
|
-
* process.exit(err.exitCode)
|
|
37
|
-
* }
|
|
38
|
-
* // fall through to generic handling
|
|
39
|
-
* }
|
|
40
|
-
*/
|
|
41
|
-
export declare class InitSkillError extends Error {
|
|
42
|
-
/**
|
|
43
|
-
* Process exit code to use when this error reaches the command wrapper.
|
|
44
|
-
* Defaults to 1 (generic failure). Use other codes only when the caller
|
|
45
|
-
* needs to distinguish failure modes in scripted contexts.
|
|
46
|
-
*/
|
|
47
|
-
readonly exitCode: number;
|
|
48
|
-
constructor(message: string, exitCode?: number, options?: {
|
|
49
|
-
cause?: unknown;
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC;;;;OAIG;IACH,SAAgB,QAAQ,EAAE,MAAM,CAAA;gBAEpB,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAUjF"}
|