@skillsmith/cli 0.7.2 → 0.7.4
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 +44014 -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 -285
- 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 -108
- 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,430 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SMI-1433: MCP Server Template
|
|
3
|
-
*
|
|
4
|
-
* Templates for scaffolding TypeScript MCP servers with stdio transport.
|
|
5
|
-
* Generated servers are npx-ready and follow @modelcontextprotocol/sdk patterns.
|
|
6
|
-
*
|
|
7
|
-
* @example Basic Usage
|
|
8
|
-
* ```typescript
|
|
9
|
-
* import { renderMcpServerTemplates } from './mcp-server.template.js'
|
|
10
|
-
*
|
|
11
|
-
* const files = renderMcpServerTemplates({
|
|
12
|
-
* name: 'my-mcp-server',
|
|
13
|
-
* description: 'Does cool things',
|
|
14
|
-
* author: 'developer',
|
|
15
|
-
* tools: []
|
|
16
|
-
* })
|
|
17
|
-
*
|
|
18
|
-
* // files is a Map<string, string> of file paths to content
|
|
19
|
-
* // Keys: package.json, tsconfig.json, src/index.ts, src/server.ts,
|
|
20
|
-
* // src/tools/index.ts, src/tools/example.ts, README.md, .gitignore
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* @example With Custom Tools
|
|
24
|
-
* ```typescript
|
|
25
|
-
* const files = renderMcpServerTemplates({
|
|
26
|
-
* name: 'slack-mcp',
|
|
27
|
-
* description: 'Slack integration MCP server',
|
|
28
|
-
* author: 'team',
|
|
29
|
-
* tools: [
|
|
30
|
-
* {
|
|
31
|
-
* name: 'send_message',
|
|
32
|
-
* description: 'Send a Slack message',
|
|
33
|
-
* parameters: [
|
|
34
|
-
* { name: 'channel', type: 'string', description: 'Channel ID', required: true },
|
|
35
|
-
* { name: 'text', type: 'string', description: 'Message text', required: true }
|
|
36
|
-
* ]
|
|
37
|
-
* }
|
|
38
|
-
* ]
|
|
39
|
-
* })
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
* @module mcp-server-template
|
|
43
|
-
*/
|
|
44
|
-
import { VERSIONS } from './mcp-template-types.js';
|
|
45
|
-
// Import handlers
|
|
46
|
-
import { generateToolDefinition, generateToolCase, generateToolImport, generateToolImplementation, generateToolDocs, } from './mcp-template-handlers.js';
|
|
47
|
-
// ============================================================================
|
|
48
|
-
// Template Constants
|
|
49
|
-
// ============================================================================
|
|
50
|
-
/**
|
|
51
|
-
* package.json template for MCP server
|
|
52
|
-
*/
|
|
53
|
-
export const PACKAGE_JSON_TEMPLATE = `{
|
|
54
|
-
"name": "{{name}}",
|
|
55
|
-
"version": "0.1.0",
|
|
56
|
-
"description": "{{description}}",
|
|
57
|
-
"type": "module",
|
|
58
|
-
"main": "dist/index.js",
|
|
59
|
-
"bin": {
|
|
60
|
-
"{{name}}": "./dist/index.js"
|
|
61
|
-
},
|
|
62
|
-
"scripts": {
|
|
63
|
-
"build": "tsc",
|
|
64
|
-
"start": "node dist/index.js",
|
|
65
|
-
"dev": "tsx src/index.ts",
|
|
66
|
-
"watch": "tsc --watch",
|
|
67
|
-
"prepublishOnly": "npm run build"
|
|
68
|
-
},
|
|
69
|
-
"keywords": [
|
|
70
|
-
"mcp",
|
|
71
|
-
"mcp-server",
|
|
72
|
-
"claude",
|
|
73
|
-
"ai"
|
|
74
|
-
],
|
|
75
|
-
"author": "{{author}}",
|
|
76
|
-
"license": "MIT",
|
|
77
|
-
"dependencies": {
|
|
78
|
-
"@modelcontextprotocol/sdk": "${VERSIONS.MCP_SDK}"
|
|
79
|
-
},
|
|
80
|
-
"devDependencies": {
|
|
81
|
-
"@types/node": "${VERSIONS.TYPES_NODE}",
|
|
82
|
-
"tsx": "${VERSIONS.TSX}",
|
|
83
|
-
"typescript": "${VERSIONS.TYPESCRIPT}"
|
|
84
|
-
},
|
|
85
|
-
"engines": {
|
|
86
|
-
"node": "${VERSIONS.NODE_ENGINE}"
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
`;
|
|
90
|
-
/**
|
|
91
|
-
* tsconfig.json template for MCP server
|
|
92
|
-
*/
|
|
93
|
-
export const TSCONFIG_JSON_TEMPLATE = `{
|
|
94
|
-
"compilerOptions": {
|
|
95
|
-
"target": "ES2022",
|
|
96
|
-
"module": "NodeNext",
|
|
97
|
-
"moduleResolution": "NodeNext",
|
|
98
|
-
"lib": ["ES2022"],
|
|
99
|
-
"outDir": "./dist",
|
|
100
|
-
"rootDir": "./src",
|
|
101
|
-
"strict": true,
|
|
102
|
-
"esModuleInterop": true,
|
|
103
|
-
"skipLibCheck": true,
|
|
104
|
-
"forceConsistentCasingInFileNames": true,
|
|
105
|
-
"declaration": true,
|
|
106
|
-
"declarationMap": true,
|
|
107
|
-
"sourceMap": true
|
|
108
|
-
},
|
|
109
|
-
"include": ["src/**/*"],
|
|
110
|
-
"exclude": ["node_modules", "dist"]
|
|
111
|
-
}
|
|
112
|
-
`;
|
|
113
|
-
/**
|
|
114
|
-
* Main entry point (src/index.ts) template
|
|
115
|
-
*/
|
|
116
|
-
export const INDEX_TS_TEMPLATE = `#!/usr/bin/env node
|
|
117
|
-
/**
|
|
118
|
-
* {{name}} - MCP Server
|
|
119
|
-
*
|
|
120
|
-
* {{description}}
|
|
121
|
-
*/
|
|
122
|
-
|
|
123
|
-
import { createServer, createTransport } from './server.js'
|
|
124
|
-
|
|
125
|
-
async function main(): Promise<void> {
|
|
126
|
-
const server = createServer()
|
|
127
|
-
const transport = createTransport()
|
|
128
|
-
await server.connect(transport)
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
main().catch((error) => {
|
|
132
|
-
console.error('Server error:', error)
|
|
133
|
-
process.exit(1)
|
|
134
|
-
})
|
|
135
|
-
`;
|
|
136
|
-
/**
|
|
137
|
-
* Server setup (src/server.ts) template
|
|
138
|
-
*/
|
|
139
|
-
export const SERVER_TS_TEMPLATE = `/**
|
|
140
|
-
* MCP Server Configuration
|
|
141
|
-
*
|
|
142
|
-
* Sets up the MCP server with tool handlers.
|
|
143
|
-
*/
|
|
144
|
-
|
|
145
|
-
import { Server } from '@modelcontextprotocol/sdk/server/index.js'
|
|
146
|
-
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
147
|
-
import {
|
|
148
|
-
CallToolRequestSchema,
|
|
149
|
-
ListToolsRequestSchema,
|
|
150
|
-
} from '@modelcontextprotocol/sdk/types.js'
|
|
151
|
-
|
|
152
|
-
import { tools, handleToolCall } from './tools/index.js'
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Create and configure the MCP server
|
|
156
|
-
*/
|
|
157
|
-
export function createServer(): Server {
|
|
158
|
-
const server = new Server(
|
|
159
|
-
{
|
|
160
|
-
name: '{{name}}',
|
|
161
|
-
version: '0.1.0',
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
capabilities: {
|
|
165
|
-
tools: {},
|
|
166
|
-
},
|
|
167
|
-
}
|
|
168
|
-
)
|
|
169
|
-
|
|
170
|
-
// Register tool listing handler
|
|
171
|
-
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
172
|
-
return { tools }
|
|
173
|
-
})
|
|
174
|
-
|
|
175
|
-
// Register tool execution handler
|
|
176
|
-
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
177
|
-
const { name, arguments: args } = request.params
|
|
178
|
-
|
|
179
|
-
try {
|
|
180
|
-
const result = await handleToolCall(name, args || {})
|
|
181
|
-
return {
|
|
182
|
-
content: [
|
|
183
|
-
{
|
|
184
|
-
type: 'text',
|
|
185
|
-
text: typeof result === 'string' ? result : JSON.stringify(result, null, 2),
|
|
186
|
-
},
|
|
187
|
-
],
|
|
188
|
-
}
|
|
189
|
-
} catch (error) {
|
|
190
|
-
const message = error instanceof Error ? error.message : 'Unknown error'
|
|
191
|
-
return {
|
|
192
|
-
content: [{ type: 'text', text: \`Error: \${message}\` }],
|
|
193
|
-
isError: true,
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
})
|
|
197
|
-
|
|
198
|
-
return server
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Create a stdio transport for the server
|
|
203
|
-
*/
|
|
204
|
-
export function createTransport(): StdioServerTransport {
|
|
205
|
-
return new StdioServerTransport()
|
|
206
|
-
}
|
|
207
|
-
`;
|
|
208
|
-
/**
|
|
209
|
-
* Tools index (src/tools/index.ts) template
|
|
210
|
-
*/
|
|
211
|
-
export const TOOLS_INDEX_TS_TEMPLATE = `/**
|
|
212
|
-
* Tool Definitions and Handlers
|
|
213
|
-
*
|
|
214
|
-
* Register your MCP tools here.
|
|
215
|
-
*/
|
|
216
|
-
|
|
217
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js'
|
|
218
|
-
{{toolImports}}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Tool definitions exposed by this MCP server
|
|
222
|
-
*/
|
|
223
|
-
export const tools: Tool[] = [
|
|
224
|
-
{{toolDefinitions}}
|
|
225
|
-
]
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Route tool calls to appropriate handlers
|
|
229
|
-
*/
|
|
230
|
-
export async function handleToolCall(
|
|
231
|
-
name: string,
|
|
232
|
-
args: Record<string, unknown>
|
|
233
|
-
): Promise<unknown> {
|
|
234
|
-
switch (name) {
|
|
235
|
-
{{toolCases}}
|
|
236
|
-
default:
|
|
237
|
-
throw new Error(\`Unknown tool: \${name}\`)
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
`;
|
|
241
|
-
/**
|
|
242
|
-
* Example tool implementation template
|
|
243
|
-
*/
|
|
244
|
-
export const EXAMPLE_TOOL_TS_TEMPLATE = `/**
|
|
245
|
-
* Example Tool Implementation
|
|
246
|
-
*
|
|
247
|
-
* This is a sample tool to demonstrate the pattern.
|
|
248
|
-
* Replace with your actual tool logic.
|
|
249
|
-
*/
|
|
250
|
-
|
|
251
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js'
|
|
252
|
-
|
|
253
|
-
export const exampleToolDefinition: Tool = {
|
|
254
|
-
name: 'example',
|
|
255
|
-
description: 'An example tool that echoes input',
|
|
256
|
-
inputSchema: {
|
|
257
|
-
type: 'object',
|
|
258
|
-
properties: {
|
|
259
|
-
message: {
|
|
260
|
-
type: 'string',
|
|
261
|
-
description: 'Message to echo back',
|
|
262
|
-
},
|
|
263
|
-
},
|
|
264
|
-
required: ['message'],
|
|
265
|
-
},
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
export interface ExampleToolArgs {
|
|
269
|
-
message: string
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
export async function handleExampleTool(args: ExampleToolArgs): Promise<string> {
|
|
273
|
-
return \`Echo: \${args.message}\`
|
|
274
|
-
}
|
|
275
|
-
`;
|
|
276
|
-
/**
|
|
277
|
-
* README.md template for MCP server
|
|
278
|
-
*/
|
|
279
|
-
export const MCP_README_TEMPLATE = `# {{name}}
|
|
280
|
-
|
|
281
|
-
{{description}}
|
|
282
|
-
|
|
283
|
-
## Installation
|
|
284
|
-
|
|
285
|
-
\`\`\`bash
|
|
286
|
-
npm install -g {{name}}
|
|
287
|
-
\`\`\`
|
|
288
|
-
|
|
289
|
-
Or use directly with npx:
|
|
290
|
-
|
|
291
|
-
\`\`\`bash
|
|
292
|
-
npx {{name}}
|
|
293
|
-
\`\`\`
|
|
294
|
-
|
|
295
|
-
## Configuration
|
|
296
|
-
|
|
297
|
-
This server is MCP-compatible — pick the snippet that matches your agent.
|
|
298
|
-
SMI-4580: snippets are sourced from \`@skillsmith/cli/templates/mcp-server.template.snippets\`
|
|
299
|
-
so docs and scaffolded READMEs can't drift.
|
|
300
|
-
|
|
301
|
-
{{clientSnippets}}
|
|
302
|
-
|
|
303
|
-
## Available Tools
|
|
304
|
-
|
|
305
|
-
{{toolDocs}}
|
|
306
|
-
|
|
307
|
-
## Development
|
|
308
|
-
|
|
309
|
-
\`\`\`bash
|
|
310
|
-
# Install dependencies
|
|
311
|
-
npm install
|
|
312
|
-
|
|
313
|
-
# Run in development mode
|
|
314
|
-
npm run dev
|
|
315
|
-
|
|
316
|
-
# Build for production
|
|
317
|
-
npm run build
|
|
318
|
-
|
|
319
|
-
# Run production build
|
|
320
|
-
npm start
|
|
321
|
-
\`\`\`
|
|
322
|
-
|
|
323
|
-
## License
|
|
324
|
-
|
|
325
|
-
MIT
|
|
326
|
-
`;
|
|
327
|
-
/**
|
|
328
|
-
* .gitignore template for MCP server
|
|
329
|
-
*/
|
|
330
|
-
export const MCP_GITIGNORE_TEMPLATE = `# Dependencies
|
|
331
|
-
node_modules/
|
|
332
|
-
|
|
333
|
-
# Build output
|
|
334
|
-
dist/
|
|
335
|
-
|
|
336
|
-
# Environment
|
|
337
|
-
.env
|
|
338
|
-
.env.local
|
|
339
|
-
.env.*.local
|
|
340
|
-
|
|
341
|
-
# IDE
|
|
342
|
-
.idea/
|
|
343
|
-
.vscode/
|
|
344
|
-
*.swp
|
|
345
|
-
*.swo
|
|
346
|
-
|
|
347
|
-
# OS
|
|
348
|
-
.DS_Store
|
|
349
|
-
Thumbs.db
|
|
350
|
-
|
|
351
|
-
# Logs
|
|
352
|
-
*.log
|
|
353
|
-
npm-debug.log*
|
|
354
|
-
|
|
355
|
-
# Test coverage
|
|
356
|
-
coverage/
|
|
357
|
-
`;
|
|
358
|
-
// SMI-4580: per-client config snippet matrix
|
|
359
|
-
import { renderAllSnippetsAsMarkdown } from './mcp-server.template.snippets.js';
|
|
360
|
-
// ============================================================================
|
|
361
|
-
// Main Render Function
|
|
362
|
-
// ============================================================================
|
|
363
|
-
/**
|
|
364
|
-
* Render MCP server templates
|
|
365
|
-
*/
|
|
366
|
-
export function renderMcpServerTemplates(data) {
|
|
367
|
-
const files = new Map();
|
|
368
|
-
// Use example tool if no tools specified
|
|
369
|
-
const toolsToUse = data.tools.length > 0
|
|
370
|
-
? data.tools
|
|
371
|
-
: [
|
|
372
|
-
{
|
|
373
|
-
name: 'example',
|
|
374
|
-
description: 'An example tool that echoes input',
|
|
375
|
-
parameters: [
|
|
376
|
-
{
|
|
377
|
-
name: 'message',
|
|
378
|
-
type: 'string',
|
|
379
|
-
description: 'Message to echo back',
|
|
380
|
-
required: true,
|
|
381
|
-
},
|
|
382
|
-
],
|
|
383
|
-
},
|
|
384
|
-
];
|
|
385
|
-
// Generate tool-specific code
|
|
386
|
-
const toolImports = toolsToUse.map(generateToolImport).join('\n');
|
|
387
|
-
const toolDefinitions = toolsToUse.map((t) => generateToolDefinition(t)).join('\n');
|
|
388
|
-
const toolCases = toolsToUse.map(generateToolCase).join('\n');
|
|
389
|
-
const toolDocs = generateToolDocs(data.tools);
|
|
390
|
-
// package.json
|
|
391
|
-
files.set('package.json', PACKAGE_JSON_TEMPLATE.replace(/\{\{name\}\}/g, data.name)
|
|
392
|
-
.replace(/\{\{description\}\}/g, data.description)
|
|
393
|
-
.replace(/\{\{author\}\}/g, data.author));
|
|
394
|
-
// tsconfig.json
|
|
395
|
-
files.set('tsconfig.json', TSCONFIG_JSON_TEMPLATE);
|
|
396
|
-
// src/index.ts
|
|
397
|
-
files.set('src/index.ts', INDEX_TS_TEMPLATE.replace(/\{\{name\}\}/g, data.name).replace(/\{\{description\}\}/g, data.description));
|
|
398
|
-
// src/server.ts
|
|
399
|
-
files.set('src/server.ts', SERVER_TS_TEMPLATE.replace(/\{\{name\}\}/g, data.name));
|
|
400
|
-
// src/tools/index.ts
|
|
401
|
-
files.set('src/tools/index.ts', TOOLS_INDEX_TS_TEMPLATE.replace(/\{\{toolImports\}\}/g, toolImports)
|
|
402
|
-
.replace(/\{\{toolDefinitions\}\}/g, toolDefinitions)
|
|
403
|
-
.replace(/\{\{toolCases\}\}/g, toolCases));
|
|
404
|
-
// Generate tool implementation files
|
|
405
|
-
if (data.tools.length > 0) {
|
|
406
|
-
// Generate stub implementations for custom tools
|
|
407
|
-
for (const tool of data.tools) {
|
|
408
|
-
files.set(`src/tools/${tool.name}.ts`, generateToolImplementation(tool));
|
|
409
|
-
}
|
|
410
|
-
// Include example.ts as reference
|
|
411
|
-
files.set('src/tools/example.ts', EXAMPLE_TOOL_TS_TEMPLATE);
|
|
412
|
-
}
|
|
413
|
-
else {
|
|
414
|
-
// No custom tools - just use example tool (already imported in index.ts)
|
|
415
|
-
files.set('src/tools/example.ts', EXAMPLE_TOOL_TS_TEMPLATE);
|
|
416
|
-
}
|
|
417
|
-
// README.md
|
|
418
|
-
// SMI-4580: interpolate per-client snippets so the scaffolded README
|
|
419
|
-
// covers every supported agent (Claude Code, Cursor, Copilot,
|
|
420
|
-
// Windsurf, Codex, cross-agent) — same source as the website docs.
|
|
421
|
-
const clientSnippets = renderAllSnippetsAsMarkdown(data.name);
|
|
422
|
-
files.set('README.md', MCP_README_TEMPLATE.replace(/\{\{name\}\}/g, data.name)
|
|
423
|
-
.replace(/\{\{description\}\}/g, data.description)
|
|
424
|
-
.replace(/\{\{toolDocs\}\}/g, toolDocs)
|
|
425
|
-
.replace(/\{\{clientSnippets\}\}/g, clientSnippets));
|
|
426
|
-
// .gitignore
|
|
427
|
-
files.set('.gitignore', MCP_GITIGNORE_TEMPLATE);
|
|
428
|
-
return files;
|
|
429
|
-
}
|
|
430
|
-
//# sourceMappingURL=mcp-server.template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.template.js","sourceRoot":"","sources":["../../../src/templates/mcp-server.template.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SMI-4580: Per-client MCP config snippets.
|
|
3
|
-
*
|
|
4
|
-
* Single source of truth for the install-time configuration block each
|
|
5
|
-
* agent expects. Same source feeds:
|
|
6
|
-
* - the scaffolded mcp-server README (via mcp-server.template.ts)
|
|
7
|
-
* - the website docs (`getting-started.astro`, `quickstart.astro`)
|
|
8
|
-
* - the root README + packages/mcp-server/README.md
|
|
9
|
-
*
|
|
10
|
-
* Four of five clients accept the same `mcpServers` JSON shape.
|
|
11
|
-
* Codex needs TOML (separate `[mcp_servers.<name>]` table).
|
|
12
|
-
*
|
|
13
|
-
* @module @skillsmith/cli/templates/mcp-server.template.snippets
|
|
14
|
-
*/
|
|
15
|
-
import type { ClientId } from '@skillsmith/core/install';
|
|
16
|
-
export type SnippetClientId = ClientId | 'codex';
|
|
17
|
-
export interface ClientSnippet {
|
|
18
|
-
/** Display label for the per-client tab/section header */
|
|
19
|
-
label: string;
|
|
20
|
-
/** Path to the config file the user edits */
|
|
21
|
-
configPath: string;
|
|
22
|
-
/** File format hint for the syntax highlighter */
|
|
23
|
-
format: 'json' | 'toml';
|
|
24
|
-
/** Snippet body — interpolated with `{{name}}` for the package name */
|
|
25
|
-
body: string;
|
|
26
|
-
/** Notes shown beneath the snippet */
|
|
27
|
-
notes?: string;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Per-client snippet matrix. `name` placeholder is interpolated when the
|
|
31
|
-
* snippet is rendered; pass `'@skillsmith/mcp-server'` for the published
|
|
32
|
-
* package, or any other server name when scaffolding via the template.
|
|
33
|
-
*/
|
|
34
|
-
export declare const CLIENT_SNIPPETS: Record<SnippetClientId, ClientSnippet>;
|
|
35
|
-
/**
|
|
36
|
-
* Render a single client snippet with the package name interpolated.
|
|
37
|
-
*/
|
|
38
|
-
export declare function renderSnippet(client: SnippetClientId, packageName: string): string;
|
|
39
|
-
/**
|
|
40
|
-
* Render every snippet as a markdown section sequence — labelled with
|
|
41
|
-
* `<details>` + `<summary>` so the docs surface stays compact when no
|
|
42
|
-
* dedicated tabs component is available. Used by both the website
|
|
43
|
-
* markdown surfaces and the scaffolded mcp-server README.
|
|
44
|
-
*/
|
|
45
|
-
export declare function renderAllSnippetsAsMarkdown(packageName: string): string;
|
|
46
|
-
/**
|
|
47
|
-
* Snippet IDs in display order. Use when a docs surface needs to
|
|
48
|
-
* render snippets without a `<details>` accordion (e.g. printable PDF).
|
|
49
|
-
*/
|
|
50
|
-
export declare const SNIPPET_DISPLAY_ORDER: ReadonlyArray<SnippetClientId>;
|
|
51
|
-
//# sourceMappingURL=mcp-server.template.snippets.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.template.snippets.d.ts","sourceRoot":"","sources":["../../../src/templates/mcp-server.template.snippets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAExD,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEhD,MAAM,WAAW,aAAa;IAC5B,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAA;IACb,6CAA6C;IAC7C,UAAU,EAAE,MAAM,CAAA;IAClB,kDAAkD;IAClD,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAA;IACZ,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,eAAe,EAAE,aAAa,CAsGlE,CAAA;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAGlF;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAiBvE;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,eAAe,CAO/D,CAAA"}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SMI-4580: Per-client MCP config snippets.
|
|
3
|
-
*
|
|
4
|
-
* Single source of truth for the install-time configuration block each
|
|
5
|
-
* agent expects. Same source feeds:
|
|
6
|
-
* - the scaffolded mcp-server README (via mcp-server.template.ts)
|
|
7
|
-
* - the website docs (`getting-started.astro`, `quickstart.astro`)
|
|
8
|
-
* - the root README + packages/mcp-server/README.md
|
|
9
|
-
*
|
|
10
|
-
* Four of five clients accept the same `mcpServers` JSON shape.
|
|
11
|
-
* Codex needs TOML (separate `[mcp_servers.<name>]` table).
|
|
12
|
-
*
|
|
13
|
-
* @module @skillsmith/cli/templates/mcp-server.template.snippets
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* Per-client snippet matrix. `name` placeholder is interpolated when the
|
|
17
|
-
* snippet is rendered; pass `'@skillsmith/mcp-server'` for the published
|
|
18
|
-
* package, or any other server name when scaffolding via the template.
|
|
19
|
-
*/
|
|
20
|
-
export const CLIENT_SNIPPETS = {
|
|
21
|
-
'claude-code': {
|
|
22
|
-
label: 'Claude Code',
|
|
23
|
-
configPath: '~/.claude/settings.json',
|
|
24
|
-
format: 'json',
|
|
25
|
-
body: `{
|
|
26
|
-
"mcpServers": {
|
|
27
|
-
"{{name}}": {
|
|
28
|
-
"command": "npx",
|
|
29
|
-
"args": ["-y", "{{name}}"],
|
|
30
|
-
"env": {
|
|
31
|
-
"SKILLSMITH_API_KEY": "sk_live_..."
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}`,
|
|
36
|
-
notes: 'Restart Claude Code after editing settings.json.',
|
|
37
|
-
},
|
|
38
|
-
cursor: {
|
|
39
|
-
label: 'Cursor',
|
|
40
|
-
configPath: '~/.cursor/mcp.json',
|
|
41
|
-
format: 'json',
|
|
42
|
-
body: `{
|
|
43
|
-
"mcpServers": {
|
|
44
|
-
"{{name}}": {
|
|
45
|
-
"command": "npx",
|
|
46
|
-
"args": ["-y", "{{name}}"],
|
|
47
|
-
"env": {
|
|
48
|
-
"SKILLSMITH_API_KEY": "sk_live_..."
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}`,
|
|
53
|
-
notes: 'Cursor 2.4+ required. Reload the window after saving.',
|
|
54
|
-
},
|
|
55
|
-
copilot: {
|
|
56
|
-
label: 'GitHub Copilot (VS Code)',
|
|
57
|
-
configPath: '.vscode/mcp.json (workspace)',
|
|
58
|
-
format: 'json',
|
|
59
|
-
body: `{
|
|
60
|
-
"mcpServers": {
|
|
61
|
-
"{{name}}": {
|
|
62
|
-
"command": "npx",
|
|
63
|
-
"args": ["-y", "{{name}}"],
|
|
64
|
-
"env": {
|
|
65
|
-
"SKILLSMITH_API_KEY": "sk_live_..."
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}`,
|
|
70
|
-
notes: 'VS Code 1.108+ required. Workspace-scoped config (commit to repo if team-shared, or use user settings.json instead).',
|
|
71
|
-
},
|
|
72
|
-
windsurf: {
|
|
73
|
-
label: 'Windsurf',
|
|
74
|
-
configPath: '~/.codeium/windsurf/mcp_config.json',
|
|
75
|
-
format: 'json',
|
|
76
|
-
body: `{
|
|
77
|
-
"mcpServers": {
|
|
78
|
-
"{{name}}": {
|
|
79
|
-
"command": "npx",
|
|
80
|
-
"args": ["-y", "{{name}}"],
|
|
81
|
-
"env": {
|
|
82
|
-
"SKILLSMITH_API_KEY": "\${env:SKILLSMITH_API_KEY}"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}`,
|
|
87
|
-
notes: 'Supports `${env:VAR}` interpolation; export SKILLSMITH_API_KEY in your shell instead of inlining the secret.',
|
|
88
|
-
},
|
|
89
|
-
agents: {
|
|
90
|
-
label: 'Cross-agent (open standard)',
|
|
91
|
-
configPath: '~/.agents/mcp.json',
|
|
92
|
-
format: 'json',
|
|
93
|
-
body: `{
|
|
94
|
-
"mcpServers": {
|
|
95
|
-
"{{name}}": {
|
|
96
|
-
"command": "npx",
|
|
97
|
-
"args": ["-y", "{{name}}"],
|
|
98
|
-
"env": {
|
|
99
|
-
"SKILLSMITH_API_KEY": "sk_live_..."
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}`,
|
|
104
|
-
notes: 'Read by any agent honouring the cross-agent skill convention. Codex CLI users prefer the Codex-native TOML snippet below.',
|
|
105
|
-
},
|
|
106
|
-
codex: {
|
|
107
|
-
label: 'Codex CLI',
|
|
108
|
-
configPath: '~/.codex/config.toml',
|
|
109
|
-
format: 'toml',
|
|
110
|
-
body: `[mcp_servers.{{name}}]
|
|
111
|
-
command = "npx"
|
|
112
|
-
args = ["-y", "{{name}}"]
|
|
113
|
-
|
|
114
|
-
[mcp_servers.{{name}}.env]
|
|
115
|
-
SKILLSMITH_API_KEY = "sk_live_..."`,
|
|
116
|
-
notes: 'Codex uses TOML, not JSON. Skill discovery still reads ~/.agents/skills (set --client agents when installing via Skillsmith CLI).',
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* Render a single client snippet with the package name interpolated.
|
|
121
|
-
*/
|
|
122
|
-
export function renderSnippet(client, packageName) {
|
|
123
|
-
const snippet = CLIENT_SNIPPETS[client];
|
|
124
|
-
return snippet.body.replace(/\{\{name\}\}/g, packageName);
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Render every snippet as a markdown section sequence — labelled with
|
|
128
|
-
* `<details>` + `<summary>` so the docs surface stays compact when no
|
|
129
|
-
* dedicated tabs component is available. Used by both the website
|
|
130
|
-
* markdown surfaces and the scaffolded mcp-server README.
|
|
131
|
-
*/
|
|
132
|
-
export function renderAllSnippetsAsMarkdown(packageName) {
|
|
133
|
-
const sections = Object.keys(CLIENT_SNIPPETS).map((id) => {
|
|
134
|
-
const snippet = CLIENT_SNIPPETS[id];
|
|
135
|
-
const body = renderSnippet(id, packageName);
|
|
136
|
-
const notes = snippet.notes ? `\n\n${snippet.notes}` : '';
|
|
137
|
-
return [
|
|
138
|
-
`<details>`,
|
|
139
|
-
`<summary><strong>${snippet.label}</strong> — \`${snippet.configPath}\`</summary>`,
|
|
140
|
-
``,
|
|
141
|
-
`\`\`\`${snippet.format}`,
|
|
142
|
-
body,
|
|
143
|
-
`\`\`\`${notes}`,
|
|
144
|
-
``,
|
|
145
|
-
`</details>`,
|
|
146
|
-
].join('\n');
|
|
147
|
-
});
|
|
148
|
-
return sections.join('\n\n');
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Snippet IDs in display order. Use when a docs surface needs to
|
|
152
|
-
* render snippets without a `<details>` accordion (e.g. printable PDF).
|
|
153
|
-
*/
|
|
154
|
-
export const SNIPPET_DISPLAY_ORDER = Object.freeze([
|
|
155
|
-
'claude-code',
|
|
156
|
-
'cursor',
|
|
157
|
-
'copilot',
|
|
158
|
-
'windsurf',
|
|
159
|
-
'codex',
|
|
160
|
-
'agents',
|
|
161
|
-
]);
|
|
162
|
-
//# sourceMappingURL=mcp-server.template.snippets.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.template.snippets.js","sourceRoot":"","sources":["../../../src/templates/mcp-server.template.snippets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAmBH;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAA2C;IACrE,aAAa,EAAE;QACb,KAAK,EAAE,aAAa;QACpB,UAAU,EAAE,yBAAyB;QACrC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;;;;;;;;;;EAUR;QACE,KAAK,EAAE,kDAAkD;KAC1D;IACD,MAAM,EAAE;QACN,KAAK,EAAE,QAAQ;QACf,UAAU,EAAE,oBAAoB;QAChC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;;;;;;;;;;EAUR;QACE,KAAK,EAAE,uDAAuD;KAC/D;IACD,OAAO,EAAE;QACP,KAAK,EAAE,0BAA0B;QACjC,UAAU,EAAE,8BAA8B;QAC1C,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;;;;;;;;;;EAUR;QACE,KAAK,EACH,sHAAsH;KACzH;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,qCAAqC;QACjD,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;;;;;;;;;;EAUR;QACE,KAAK,EACH,8GAA8G;KACjH;IACD,MAAM,EAAE;QACN,KAAK,EAAE,6BAA6B;QACpC,UAAU,EAAE,oBAAoB;QAChC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;;;;;;;;;;EAUR;QACE,KAAK,EACH,2HAA2H;KAC9H;IACD,KAAK,EAAE;QACL,KAAK,EAAE,WAAW;QAClB,UAAU,EAAE,sBAAsB;QAClC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;;;;;mCAKyB;QAC/B,KAAK,EACH,mIAAmI;KACtI;CACF,CAAA;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,MAAuB,EAAE,WAAmB;IACxE,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;IACvC,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,WAAW,CAAC,CAAA;AAC3D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAC,WAAmB;IAC7D,MAAM,QAAQ,GAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAuB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;QAC9E,MAAM,OAAO,GAAG,eAAe,CAAC,EAAE,CAAC,CAAA;QACnC,MAAM,IAAI,GAAG,aAAa,CAAC,EAAE,EAAE,WAAW,CAAC,CAAA;QAC3C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QACzD,OAAO;YACL,WAAW;YACX,oBAAoB,OAAO,CAAC,KAAK,iBAAiB,OAAO,CAAC,UAAU,cAAc;YAClF,EAAE;YACF,SAAS,OAAO,CAAC,MAAM,EAAE;YACzB,IAAI;YACJ,SAAS,KAAK,EAAE;YAChB,EAAE;YACF,YAAY;SACb,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACd,CAAC,CAAC,CAAA;IACF,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AAC9B,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAmC,MAAM,CAAC,MAAM,CAAC;IACjF,aAAa;IACb,QAAQ;IACR,SAAS;IACT,UAAU;IACV,OAAO;IACP,QAAQ;CACT,CAAC,CAAA"}
|
|
@@ -1,33 +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
|
-
import type { McpToolDefinition } from './mcp-template-types.js';
|
|
9
|
-
/**
|
|
10
|
-
* Escape single quotes in strings for safe template interpolation
|
|
11
|
-
*/
|
|
12
|
-
export declare function escapeQuotes(str: string): string;
|
|
13
|
-
/**
|
|
14
|
-
* Generate tool definition code for a single tool
|
|
15
|
-
*/
|
|
16
|
-
export declare function generateToolDefinition(tool: McpToolDefinition, indent?: string): string;
|
|
17
|
-
/**
|
|
18
|
-
* Generate tool handler case for switch statement
|
|
19
|
-
*/
|
|
20
|
-
export declare function generateToolCase(tool: McpToolDefinition): string;
|
|
21
|
-
/**
|
|
22
|
-
* Generate tool import statement
|
|
23
|
-
*/
|
|
24
|
-
export declare function generateToolImport(tool: McpToolDefinition): string;
|
|
25
|
-
/**
|
|
26
|
-
* Generate a stub implementation file for a custom tool
|
|
27
|
-
*/
|
|
28
|
-
export declare function generateToolImplementation(tool: McpToolDefinition): string;
|
|
29
|
-
/**
|
|
30
|
-
* Generate tool documentation for README
|
|
31
|
-
*/
|
|
32
|
-
export declare function generateToolDocs(tools: McpToolDefinition[]): string;
|
|
33
|
-
//# sourceMappingURL=mcp-template-handlers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-template-handlers.d.ts","sourceRoot":"","sources":["../../../src/templates/mcp-template-handlers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAEhE;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,iBAAiB,EAAE,MAAM,GAAE,MAAa,GAAG,MAAM,CA4B7F;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAKhE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAGlE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAmC1E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAWnE"}
|