@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,283 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SMI-2713: Extracted from manage.ts — helpers for reading installed skills
|
|
3
|
-
* from the global and local ~/.claude/skills directories.
|
|
4
|
-
*/
|
|
5
|
-
import { readdir, readFile, realpath, stat } from 'fs/promises';
|
|
6
|
-
import { createHash } from 'crypto';
|
|
7
|
-
import { join } from 'path';
|
|
8
|
-
import { SkillParser, SkillVersionRepository, } from '@skillsmith/core';
|
|
9
|
-
import { openCliDatabase } from './open-database.js';
|
|
10
|
-
import { CANONICAL_CLIENT, CLIENT_IDS, CLIENT_NATIVE_PATHS, } from '@skillsmith/core/install';
|
|
11
|
-
import { DEFAULT_DB_PATH } from '../config.js';
|
|
12
|
-
/**
|
|
13
|
-
* SMI-1630 + SMI-4578: discovery scans every client directory
|
|
14
|
-
* (`CLIENT_NATIVE_PATHS`) plus repo-local `./.claude/skills`. Local
|
|
15
|
-
* skills take precedence over global; canonical (`claude-code`) takes
|
|
16
|
-
* precedence over secondary clients. See `getInstalledSkills` below.
|
|
17
|
-
*/
|
|
18
|
-
/**
|
|
19
|
-
* Returns the local skills directory path.
|
|
20
|
-
* Computed at call time to handle working directory changes.
|
|
21
|
-
*/
|
|
22
|
-
function getLocalSkillsDir() {
|
|
23
|
-
return join(process.cwd(), '.claude', 'skills');
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Get skills from a specific directory.
|
|
27
|
-
*
|
|
28
|
-
* When dbPath is provided, opens the skill_versions table to determine
|
|
29
|
-
* whether a newer content hash has been recorded since the skill was installed.
|
|
30
|
-
* Falls back to hasUpdates: false when the database is unavailable.
|
|
31
|
-
*
|
|
32
|
-
* @param skillsDir Directory to scan for installed skills
|
|
33
|
-
* @param dbPath Optional path to the Skillsmith SQLite database
|
|
34
|
-
* @param installedVia SMI-4578: which client (or `'local'`) this directory
|
|
35
|
-
* represents — propagated onto each returned skill so
|
|
36
|
-
* callers can render "installed via Cursor" badges.
|
|
37
|
-
*/
|
|
38
|
-
export async function getSkillsFromDirectory(skillsDir, dbPath, installedVia = CANONICAL_CLIENT) {
|
|
39
|
-
const skills = [];
|
|
40
|
-
// Open the version repository if a db path was provided
|
|
41
|
-
let versionRepo = null;
|
|
42
|
-
let dbConn = null;
|
|
43
|
-
if (dbPath) {
|
|
44
|
-
try {
|
|
45
|
-
// SMI-5139: this is a pure-read version lookup — open read-only so the
|
|
46
|
-
// WASM driver does not persist (write) on close() and throw EROFS when
|
|
47
|
-
// dbPath is unwritable/absent. A read-only open of an absent db throws
|
|
48
|
-
// (native driver), which the catch below degrades to hasUpdates: false.
|
|
49
|
-
dbConn = await openCliDatabase(dbPath, { readonly: true });
|
|
50
|
-
versionRepo = new SkillVersionRepository(dbConn);
|
|
51
|
-
}
|
|
52
|
-
catch {
|
|
53
|
-
// DB not available yet — fall back to hasUpdates: false
|
|
54
|
-
versionRepo = null;
|
|
55
|
-
dbConn = null;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
try {
|
|
59
|
-
const entries = await readdir(skillsDir, { withFileTypes: true });
|
|
60
|
-
for (const entry of entries) {
|
|
61
|
-
if (entry.isDirectory()) {
|
|
62
|
-
const skillPath = join(skillsDir, entry.name);
|
|
63
|
-
const skillMdPath = join(skillPath, 'SKILL.md');
|
|
64
|
-
try {
|
|
65
|
-
const skillMdStat = await stat(skillMdPath);
|
|
66
|
-
const content = await readFile(skillMdPath, 'utf-8');
|
|
67
|
-
const parser = new SkillParser();
|
|
68
|
-
const parsed = parser.parse(content);
|
|
69
|
-
// Determine hasUpdates by comparing the current SKILL.md hash to the
|
|
70
|
-
// most-recently recorded hash in skill_versions for this skill id.
|
|
71
|
-
let hasUpdates = false;
|
|
72
|
-
if (versionRepo && parsed) {
|
|
73
|
-
try {
|
|
74
|
-
const parsedAny = parsed;
|
|
75
|
-
const skillId = parsedAny['id'] ?? entry.name;
|
|
76
|
-
const latestVersion = await versionRepo.getLatestVersion(skillId);
|
|
77
|
-
if (latestVersion) {
|
|
78
|
-
const currentHash = createHash('sha256').update(content, 'utf8').digest('hex');
|
|
79
|
-
const storedHash = parsedAny['contentHash'] ??
|
|
80
|
-
parsedAny['originalContentHash'] ??
|
|
81
|
-
'';
|
|
82
|
-
// hasUpdates = latest recorded hash differs from what we have locally
|
|
83
|
-
hasUpdates = storedHash !== '' && latestVersion.content_hash !== storedHash;
|
|
84
|
-
// If we have no stored hash, compare against current content hash
|
|
85
|
-
if (!storedHash) {
|
|
86
|
-
hasUpdates = latestVersion.content_hash !== currentHash;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
catch {
|
|
91
|
-
// Version check failed — safe to ignore, fall back to false
|
|
92
|
-
hasUpdates = false;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
skills.push({
|
|
96
|
-
name: parsed?.name || entry.name,
|
|
97
|
-
path: skillPath,
|
|
98
|
-
version: parsed?.version || null,
|
|
99
|
-
trustTier: parsed ? parser.inferTrustTier(parsed) : 'unknown',
|
|
100
|
-
installDate: skillMdStat.mtime.toISOString().split('T')[0] || 'Unknown',
|
|
101
|
-
hasUpdates,
|
|
102
|
-
installedVia,
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
catch (error) {
|
|
106
|
-
// Only treat ENOENT (file not found) as "no SKILL.md"
|
|
107
|
-
// Re-throw permission errors and other unexpected errors
|
|
108
|
-
const errno = error.code;
|
|
109
|
-
if (errno !== 'ENOENT') {
|
|
110
|
-
throw error;
|
|
111
|
-
}
|
|
112
|
-
// No SKILL.md, treat as unknown skill
|
|
113
|
-
const dirStat = await stat(skillPath);
|
|
114
|
-
skills.push({
|
|
115
|
-
name: entry.name,
|
|
116
|
-
path: skillPath,
|
|
117
|
-
version: null,
|
|
118
|
-
trustTier: 'unknown',
|
|
119
|
-
installDate: dirStat.mtime.toISOString().split('T')[0] || 'Unknown',
|
|
120
|
-
hasUpdates: false,
|
|
121
|
-
installedVia,
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
catch (error) {
|
|
128
|
-
if (error.code !== 'ENOENT') {
|
|
129
|
-
throw error;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
finally {
|
|
133
|
-
dbConn?.close();
|
|
134
|
-
}
|
|
135
|
-
return skills;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Resolve a path through `realpath` defensively. Returns the resolved
|
|
139
|
-
* path on success, or the input path unchanged if the path is missing
|
|
140
|
-
* or unreadable — dedup keying still works either way (we just won't
|
|
141
|
-
* collapse symlinked aliases when the link is broken).
|
|
142
|
-
*/
|
|
143
|
-
async function safeRealpath(p) {
|
|
144
|
-
try {
|
|
145
|
-
return await realpath(p);
|
|
146
|
-
}
|
|
147
|
-
catch {
|
|
148
|
-
return p;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Reads `<skillPath>/SKILL.md`, returns its sha256 hex content hash and the
|
|
153
|
-
* `id` front-matter field. Both are `null` on any read/parse error.
|
|
154
|
-
* @internal
|
|
155
|
-
*/
|
|
156
|
-
async function readSkillMd(skillPath) {
|
|
157
|
-
try {
|
|
158
|
-
const content = await readFile(join(skillPath, 'SKILL.md'), 'utf-8');
|
|
159
|
-
const contentHash = createHash('sha256').update(content, 'utf8').digest('hex');
|
|
160
|
-
const parser = new SkillParser();
|
|
161
|
-
const parsed = parser.parse(content);
|
|
162
|
-
const parsedAny = parsed;
|
|
163
|
-
const skillId = parsedAny['id'] ?? null;
|
|
164
|
-
return { contentHash, skillId };
|
|
165
|
-
}
|
|
166
|
-
catch {
|
|
167
|
-
return { contentHash: null, skillId: null };
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Returns one {@link HarnessSkillEntry} per (harness × skill) observed on
|
|
172
|
-
* disk, deduplicated by realpath only.
|
|
173
|
-
*
|
|
174
|
-
* Unlike {@link getInstalledSkills}, this function:
|
|
175
|
-
* - Does **not** deduplicate by skill name — the same skill present under two
|
|
176
|
-
* distinct harness directories appears as two rows (different `path`).
|
|
177
|
-
* - Does deduplicate by realpath — a symlinked alias such as
|
|
178
|
-
* `~/.agents/skills/foo` → `~/.claude/skills/foo` collapses to one row.
|
|
179
|
-
* - Enriches each surviving entry with a sha256 `contentHash` computed from
|
|
180
|
-
* the SKILL.md content, for registry drift detection.
|
|
181
|
-
*
|
|
182
|
-
* Precedence order (first realpath wins when a symlink is detected): local
|
|
183
|
-
* (repo) > claude-code > cursor > copilot > windsurf > agents. Inherits the
|
|
184
|
-
* SMI-4578 ordering so local overrides are still respected.
|
|
185
|
-
*
|
|
186
|
-
* @see SMI-5390
|
|
187
|
-
*/
|
|
188
|
-
export async function getInstalledSkillsPerHarness() {
|
|
189
|
-
const localScan = getSkillsFromDirectory(getLocalSkillsDir(), undefined, 'local');
|
|
190
|
-
const clientScans = CLIENT_IDS.map((client) => getSkillsFromDirectory(CLIENT_NATIVE_PATHS[client], undefined, client));
|
|
191
|
-
const [localSkills, ...clientSkillsLists] = await Promise.all([localScan, ...clientScans]);
|
|
192
|
-
// Same precedence order as getInstalledSkills — local first, then
|
|
193
|
-
// canonical, then remaining clients.
|
|
194
|
-
const ordered = [...localSkills];
|
|
195
|
-
const canonicalIdx = CLIENT_IDS.indexOf(CANONICAL_CLIENT);
|
|
196
|
-
if (canonicalIdx >= 0 && clientSkillsLists[canonicalIdx]) {
|
|
197
|
-
ordered.push(...clientSkillsLists[canonicalIdx]);
|
|
198
|
-
}
|
|
199
|
-
for (let i = 0; i < CLIENT_IDS.length; i++) {
|
|
200
|
-
if (i === canonicalIdx)
|
|
201
|
-
continue;
|
|
202
|
-
const list = clientSkillsLists[i];
|
|
203
|
-
if (list)
|
|
204
|
-
ordered.push(...list);
|
|
205
|
-
}
|
|
206
|
-
// Realpath-only dedup: collapses symlinked aliases (same inode) but keeps
|
|
207
|
-
// the same skill independently installed under two different harnesses as
|
|
208
|
-
// two distinct rows.
|
|
209
|
-
const seenPaths = new Set();
|
|
210
|
-
const out = [];
|
|
211
|
-
for (const skill of ordered) {
|
|
212
|
-
const rp = await safeRealpath(skill.path);
|
|
213
|
-
if (seenPaths.has(rp))
|
|
214
|
-
continue;
|
|
215
|
-
seenPaths.add(rp);
|
|
216
|
-
const { contentHash, skillId: parsedId } = await readSkillMd(skill.path);
|
|
217
|
-
out.push({
|
|
218
|
-
harness: skill.installedVia,
|
|
219
|
-
skillId: parsedId ?? skill.name,
|
|
220
|
-
version: skill.version,
|
|
221
|
-
contentHash,
|
|
222
|
-
path: skill.path,
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
return out;
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Get list of installed skills across every client directory.
|
|
229
|
-
*
|
|
230
|
-
* SMI-4578: scans the union of `CLIENT_NATIVE_PATHS` (claude-code,
|
|
231
|
-
* cursor, copilot, windsurf, agents) plus repo-local
|
|
232
|
-
* `./.claude/skills`. Results are deduplicated by `realpath` so a
|
|
233
|
-
* symlinked `~/.agents/skills/foo` pointing at `~/.claude/skills/foo`
|
|
234
|
-
* is reported once. Each entry carries `installedVia` so the caller
|
|
235
|
-
* can render "installed via Cursor" badges.
|
|
236
|
-
*
|
|
237
|
-
* Precedence (first wins after dedup): local (repo) > claude-code >
|
|
238
|
-
* cursor > copilot > windsurf > agents. This keeps the SMI-1630
|
|
239
|
-
* promise that repo-local overrides global.
|
|
240
|
-
*
|
|
241
|
-
* @param dbPath Optional path to the Skillsmith SQLite database for
|
|
242
|
-
* update detection.
|
|
243
|
-
*/
|
|
244
|
-
export async function getInstalledSkills(dbPath) {
|
|
245
|
-
const resolvedDbPath = dbPath ?? DEFAULT_DB_PATH;
|
|
246
|
-
const localScan = getSkillsFromDirectory(getLocalSkillsDir(), resolvedDbPath, 'local');
|
|
247
|
-
const clientScans = CLIENT_IDS.map((client) => getSkillsFromDirectory(CLIENT_NATIVE_PATHS[client], resolvedDbPath, client));
|
|
248
|
-
const [localSkills, ...clientSkillsLists] = await Promise.all([localScan, ...clientScans]);
|
|
249
|
-
// Precedence order: local first, then canonical, then the rest.
|
|
250
|
-
const ordered = [...localSkills];
|
|
251
|
-
const canonicalIdx = CLIENT_IDS.indexOf(CANONICAL_CLIENT);
|
|
252
|
-
if (canonicalIdx >= 0 && clientSkillsLists[canonicalIdx]) {
|
|
253
|
-
ordered.push(...clientSkillsLists[canonicalIdx]);
|
|
254
|
-
}
|
|
255
|
-
for (let i = 0; i < CLIENT_IDS.length; i++) {
|
|
256
|
-
if (i === canonicalIdx)
|
|
257
|
-
continue;
|
|
258
|
-
const list = clientSkillsLists[i];
|
|
259
|
-
if (list)
|
|
260
|
-
ordered.push(...list);
|
|
261
|
-
}
|
|
262
|
-
// Dedup by both skill name AND resolved path. Name-keying enforces the
|
|
263
|
-
// precedence rule (local > canonical > others) when two clients carry
|
|
264
|
-
// independently-installed copies of the same skill. Realpath-keying
|
|
265
|
-
// collapses symlinked aliases (e.g. `~/.agents/skills` → `~/.claude/skills`)
|
|
266
|
-
// so the symlinked entry doesn't appear twice when the second hop has a
|
|
267
|
-
// different `installedVia` label.
|
|
268
|
-
const seenNames = new Set();
|
|
269
|
-
const seenPaths = new Set();
|
|
270
|
-
const out = [];
|
|
271
|
-
for (const skill of ordered) {
|
|
272
|
-
if (seenNames.has(skill.name))
|
|
273
|
-
continue;
|
|
274
|
-
const realPath = await safeRealpath(skill.path);
|
|
275
|
-
if (seenPaths.has(realPath))
|
|
276
|
-
continue;
|
|
277
|
-
seenNames.add(skill.name);
|
|
278
|
-
seenPaths.add(realPath);
|
|
279
|
-
out.push(skill);
|
|
280
|
-
}
|
|
281
|
-
return out;
|
|
282
|
-
}
|
|
283
|
-
//# sourceMappingURL=skills-directory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skills-directory.js","sourceRoot":"","sources":["../../../src/utils/skills-directory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EACL,WAAW,EACX,sBAAsB,GAGvB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,mBAAmB,GAEpB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAi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CAAC;IAED,uEAAuE;IACvE,sEAAsE;IACtE,oEAAoE;IACpE,6EAA6E;IAC7E,wEAAwE;IACxE,kCAAkC;IAClC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAU,CAAA;IACnC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAU,CAAA;IACnC,MAAM,GAAG,GAAqB,EAAE,CAAA;IAChC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YAAE,SAAQ;QACvC,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC/C,IAAI,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC;YAAE,SAAQ;QACrC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACzB,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QACvB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACjB,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SMI-5427: gate for the CLI startup header (version + license banner).
|
|
3
|
-
*
|
|
4
|
-
* The header is human context, not program output, so it is suppressed for
|
|
5
|
-
* non-TTY / piped / scripted use, for the auth commands, and for machine-readable
|
|
6
|
-
* subcommands. Subcommands are matched by FULL path (`parent leaf`) — a bare leaf
|
|
7
|
-
* like `status` is ambiguous across groups (`inventory status` vs `sync status`
|
|
8
|
-
* vs `telemetry status`), so matching the leaf alone would over-exempt.
|
|
9
|
-
*
|
|
10
|
-
* @module @skillsmith/cli/utils/startup-header-gate
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Resolve a command's full path. A top-level command (whose parent is the program
|
|
14
|
-
* root) resolves to its bare leaf name; a subcommand resolves to `parent leaf`.
|
|
15
|
-
*
|
|
16
|
-
* @param leaf - The action command's own name (e.g. `push`).
|
|
17
|
-
* @param parentName - The parent command's name, or `undefined` for top-level.
|
|
18
|
-
* @param rootName - The program root name (`skillsmith` or the `sklx` alias).
|
|
19
|
-
*/
|
|
20
|
-
export declare function resolveCommandPath(leaf: string, parentName: string | undefined, rootName: string): string;
|
|
21
|
-
/**
|
|
22
|
-
* Whether the startup header should be displayed.
|
|
23
|
-
*
|
|
24
|
-
* @param commandPath - Full command path from {@link resolveCommandPath}.
|
|
25
|
-
* @param isTTY - `process.stdout.isTTY`; a non-TTY (piped/scripted) stream never
|
|
26
|
-
* shows the header so it cannot pollute machine-readable output.
|
|
27
|
-
*/
|
|
28
|
-
export declare function shouldShowStartupHeader(commandPath: string, isTTY: boolean): boolean;
|
|
29
|
-
//# sourceMappingURL=startup-header-gate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startup-header-gate.d.ts","sourceRoot":"","sources":["../../../src/utils/startup-header-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAYH;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,GACf,MAAM,CAER;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAGpF"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SMI-5427: gate for the CLI startup header (version + license banner).
|
|
3
|
-
*
|
|
4
|
-
* The header is human context, not program output, so it is suppressed for
|
|
5
|
-
* non-TTY / piped / scripted use, for the auth commands, and for machine-readable
|
|
6
|
-
* subcommands. Subcommands are matched by FULL path (`parent leaf`) — a bare leaf
|
|
7
|
-
* like `status` is ambiguous across groups (`inventory status` vs `sync status`
|
|
8
|
-
* vs `telemetry status`), so matching the leaf alone would over-exempt.
|
|
9
|
-
*
|
|
10
|
-
* @module @skillsmith/cli/utils/startup-header-gate
|
|
11
|
-
*/
|
|
12
|
-
/** Commands (full `parent leaf` path, or bare leaf for top-level) that never show the header. */
|
|
13
|
-
const NO_HEADER_COMMANDS = new Set([
|
|
14
|
-
'login',
|
|
15
|
-
'logout',
|
|
16
|
-
'whoami',
|
|
17
|
-
'inventory push',
|
|
18
|
-
'inventory status',
|
|
19
|
-
'inventory forget-device',
|
|
20
|
-
]);
|
|
21
|
-
/**
|
|
22
|
-
* Resolve a command's full path. A top-level command (whose parent is the program
|
|
23
|
-
* root) resolves to its bare leaf name; a subcommand resolves to `parent leaf`.
|
|
24
|
-
*
|
|
25
|
-
* @param leaf - The action command's own name (e.g. `push`).
|
|
26
|
-
* @param parentName - The parent command's name, or `undefined` for top-level.
|
|
27
|
-
* @param rootName - The program root name (`skillsmith` or the `sklx` alias).
|
|
28
|
-
*/
|
|
29
|
-
export function resolveCommandPath(leaf, parentName, rootName) {
|
|
30
|
-
return parentName && parentName !== rootName ? `${parentName} ${leaf}` : leaf;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Whether the startup header should be displayed.
|
|
34
|
-
*
|
|
35
|
-
* @param commandPath - Full command path from {@link resolveCommandPath}.
|
|
36
|
-
* @param isTTY - `process.stdout.isTTY`; a non-TTY (piped/scripted) stream never
|
|
37
|
-
* shows the header so it cannot pollute machine-readable output.
|
|
38
|
-
*/
|
|
39
|
-
export function shouldShowStartupHeader(commandPath, isTTY) {
|
|
40
|
-
if (!isTTY)
|
|
41
|
-
return false;
|
|
42
|
-
return !NO_HEADER_COMMANDS.has(commandPath);
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=startup-header-gate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startup-header-gate.js","sourceRoot":"","sources":["../../../src/utils/startup-header-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,iGAAiG;AACjG,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAS;IACzC,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,gBAAgB;IAChB,kBAAkB;IAClB,yBAAyB;CAC1B,CAAC,CAAA;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAChC,IAAY,EACZ,UAA8B,EAC9B,QAAgB;IAEhB,OAAO,UAAU,IAAI,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;AAC/E,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAC,WAAmB,EAAE,KAAc;IACzE,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAA;IACxB,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;AAC7C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startup-header-gate.test.d.ts","sourceRoot":"","sources":["../../../src/utils/startup-header-gate.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { resolveCommandPath, shouldShowStartupHeader } from './startup-header-gate.js';
|
|
3
|
-
describe('SMI-5427 startup-header-gate', () => {
|
|
4
|
-
describe('resolveCommandPath', () => {
|
|
5
|
-
it('returns the bare leaf for a top-level command (parent is the root)', () => {
|
|
6
|
-
expect(resolveCommandPath('search', 'skillsmith', 'skillsmith')).toBe('search');
|
|
7
|
-
});
|
|
8
|
-
it('returns parent+leaf for a subcommand', () => {
|
|
9
|
-
expect(resolveCommandPath('push', 'inventory', 'skillsmith')).toBe('inventory push');
|
|
10
|
-
});
|
|
11
|
-
it('returns the bare leaf when there is no parent', () => {
|
|
12
|
-
expect(resolveCommandPath('login', undefined, 'skillsmith')).toBe('login');
|
|
13
|
-
});
|
|
14
|
-
it('resolves correctly under the sklx alias root', () => {
|
|
15
|
-
expect(resolveCommandPath('search', 'sklx', 'sklx')).toBe('search');
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
describe('shouldShowStartupHeader', () => {
|
|
19
|
-
it('never shows on a non-TTY stream (piped/scripted)', () => {
|
|
20
|
-
expect(shouldShowStartupHeader('search', false)).toBe(false);
|
|
21
|
-
expect(shouldShowStartupHeader('inventory push', false)).toBe(false);
|
|
22
|
-
});
|
|
23
|
-
it('shows for a normal command on a TTY', () => {
|
|
24
|
-
expect(shouldShowStartupHeader('search', true)).toBe(true);
|
|
25
|
-
expect(shouldShowStartupHeader('install', true)).toBe(true);
|
|
26
|
-
});
|
|
27
|
-
it('suppresses the auth commands', () => {
|
|
28
|
-
expect(shouldShowStartupHeader('login', true)).toBe(false);
|
|
29
|
-
expect(shouldShowStartupHeader('logout', true)).toBe(false);
|
|
30
|
-
expect(shouldShowStartupHeader('whoami', true)).toBe(false);
|
|
31
|
-
});
|
|
32
|
-
it('suppresses inventory machine-readable subcommands by full path', () => {
|
|
33
|
-
expect(shouldShowStartupHeader('inventory push', true)).toBe(false);
|
|
34
|
-
expect(shouldShowStartupHeader('inventory status', true)).toBe(false);
|
|
35
|
-
expect(shouldShowStartupHeader('inventory forget-device', true)).toBe(false);
|
|
36
|
-
});
|
|
37
|
-
it('does NOT over-exempt same-leaf subcommands of other groups (collision guard)', () => {
|
|
38
|
-
// `sync status` / `telemetry status` share the `status` leaf with
|
|
39
|
-
// `inventory status` but must still show the header — the gate matches the
|
|
40
|
-
// full parent+leaf path, not the bare leaf (review finding C8).
|
|
41
|
-
expect(shouldShowStartupHeader('sync status', true)).toBe(true);
|
|
42
|
-
expect(shouldShowStartupHeader('telemetry status', true)).toBe(true);
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=startup-header-gate.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"startup-header-gate.test.js","sourceRoot":"","sources":["../../../src/ut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AuB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YAC/D,MAAM,CAAC,uBAAuB,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACtE,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SMI-1389: Tool Detection for Subagent Generation
|
|
3
|
-
*
|
|
4
|
-
* Analyzes SKILL.md content to determine minimal required tools
|
|
5
|
-
* for subagent execution, enabling context isolation and token savings.
|
|
6
|
-
*/
|
|
7
|
-
export interface ToolAnalysis {
|
|
8
|
-
requiredTools: string[];
|
|
9
|
-
recommendedTools: string[];
|
|
10
|
-
detectedPatterns: string[];
|
|
11
|
-
confidence: 'high' | 'medium' | 'low';
|
|
12
|
-
}
|
|
13
|
-
interface ToolPattern {
|
|
14
|
-
always?: boolean;
|
|
15
|
-
patterns: string[];
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Tool detection patterns
|
|
19
|
-
* Each tool has patterns that indicate its requirement
|
|
20
|
-
*/
|
|
21
|
-
export declare const TOOL_PATTERNS: Record<string, ToolPattern>;
|
|
22
|
-
/**
|
|
23
|
-
* Analyze skill content to determine required tools
|
|
24
|
-
*
|
|
25
|
-
* @param skillContent - The full SKILL.md content
|
|
26
|
-
* @returns Analysis of required and recommended tools
|
|
27
|
-
*/
|
|
28
|
-
export declare function analyzeToolRequirements(skillContent: string): ToolAnalysis;
|
|
29
|
-
/**
|
|
30
|
-
* Format tool list for YAML output
|
|
31
|
-
*
|
|
32
|
-
* @param tools - Array of tool names
|
|
33
|
-
* @returns Formatted string for YAML tools field
|
|
34
|
-
*/
|
|
35
|
-
export declare function formatToolList(tools: string[]): string;
|
|
36
|
-
/**
|
|
37
|
-
* Parse comma-separated tools string into array
|
|
38
|
-
*
|
|
39
|
-
* @param toolsString - Comma-separated tools (e.g., "Read, Write, Bash")
|
|
40
|
-
* @returns Array of tool names
|
|
41
|
-
*/
|
|
42
|
-
export declare function parseToolsString(toolsString: string): string[];
|
|
43
|
-
/**
|
|
44
|
-
* Validate that all tools in the list are recognized
|
|
45
|
-
*
|
|
46
|
-
* @param tools - Array of tool names to validate
|
|
47
|
-
* @returns Object with valid boolean and any unrecognized tools
|
|
48
|
-
*/
|
|
49
|
-
export declare function validateTools(tools: string[]): {
|
|
50
|
-
valid: boolean;
|
|
51
|
-
unrecognized: string[];
|
|
52
|
-
};
|
|
53
|
-
export {};
|
|
54
|
-
//# sourceMappingURL=tool-analyzer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-analyzer.d.ts","sourceRoot":"","sources":["../../../src/utils/tool-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAA;CACtC;AAED,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAsErD,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,GAAG,YAAY,CAmC1E;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAKtD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAK9D;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAQzF"}
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SMI-1389: Tool Detection for Subagent Generation
|
|
3
|
-
*
|
|
4
|
-
* Analyzes SKILL.md content to determine minimal required tools
|
|
5
|
-
* for subagent execution, enabling context isolation and token savings.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Tool detection patterns
|
|
9
|
-
* Each tool has patterns that indicate its requirement
|
|
10
|
-
*/
|
|
11
|
-
export const TOOL_PATTERNS = {
|
|
12
|
-
Read: { always: true, patterns: [] },
|
|
13
|
-
Write: {
|
|
14
|
-
patterns: [
|
|
15
|
-
'write',
|
|
16
|
-
'create file',
|
|
17
|
-
'save',
|
|
18
|
-
'output to file',
|
|
19
|
-
'generate file',
|
|
20
|
-
'write to',
|
|
21
|
-
'create new file',
|
|
22
|
-
],
|
|
23
|
-
},
|
|
24
|
-
Edit: {
|
|
25
|
-
patterns: [
|
|
26
|
-
'edit',
|
|
27
|
-
'modify',
|
|
28
|
-
'update file',
|
|
29
|
-
'patch',
|
|
30
|
-
'change file',
|
|
31
|
-
'replace in file',
|
|
32
|
-
'refactor',
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
Bash: {
|
|
36
|
-
patterns: [
|
|
37
|
-
'bash',
|
|
38
|
-
'npm',
|
|
39
|
-
'npx',
|
|
40
|
-
'run command',
|
|
41
|
-
'execute',
|
|
42
|
-
'terminal',
|
|
43
|
-
'shell',
|
|
44
|
-
'command line',
|
|
45
|
-
'cli',
|
|
46
|
-
'git ',
|
|
47
|
-
'docker',
|
|
48
|
-
'yarn',
|
|
49
|
-
'pnpm',
|
|
50
|
-
],
|
|
51
|
-
},
|
|
52
|
-
Grep: {
|
|
53
|
-
patterns: [
|
|
54
|
-
'search',
|
|
55
|
-
'find text',
|
|
56
|
-
'grep',
|
|
57
|
-
'pattern match',
|
|
58
|
-
'search for',
|
|
59
|
-
'look for',
|
|
60
|
-
'find in files',
|
|
61
|
-
],
|
|
62
|
-
},
|
|
63
|
-
Glob: {
|
|
64
|
-
patterns: ['find file', 'glob', 'file pattern', 'locate file', 'list files', 'find files'],
|
|
65
|
-
},
|
|
66
|
-
WebFetch: {
|
|
67
|
-
patterns: [
|
|
68
|
-
'fetch',
|
|
69
|
-
'http',
|
|
70
|
-
'api call',
|
|
71
|
-
'url',
|
|
72
|
-
'web request',
|
|
73
|
-
'download',
|
|
74
|
-
'get from url',
|
|
75
|
-
'request',
|
|
76
|
-
],
|
|
77
|
-
},
|
|
78
|
-
WebSearch: {
|
|
79
|
-
patterns: ['web search', 'search online', 'google', 'lookup online', 'search the web'],
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* Analyze skill content to determine required tools
|
|
84
|
-
*
|
|
85
|
-
* @param skillContent - The full SKILL.md content
|
|
86
|
-
* @returns Analysis of required and recommended tools
|
|
87
|
-
*/
|
|
88
|
-
export function analyzeToolRequirements(skillContent) {
|
|
89
|
-
const content = skillContent.toLowerCase();
|
|
90
|
-
const tools = new Set();
|
|
91
|
-
const patterns = [];
|
|
92
|
-
for (const [tool, config] of Object.entries(TOOL_PATTERNS)) {
|
|
93
|
-
// Always include tools marked as 'always'
|
|
94
|
-
if (config.always) {
|
|
95
|
-
tools.add(tool);
|
|
96
|
-
continue;
|
|
97
|
-
}
|
|
98
|
-
// Check each pattern for the tool
|
|
99
|
-
for (const pattern of config.patterns) {
|
|
100
|
-
if (content.includes(pattern)) {
|
|
101
|
-
tools.add(tool);
|
|
102
|
-
patterns.push(`${tool}: matched "${pattern}"`);
|
|
103
|
-
break; // Only need one match per tool
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
// Determine confidence based on pattern matches
|
|
108
|
-
const matchCount = patterns.length;
|
|
109
|
-
const confidence = matchCount >= 3 ? 'high' : matchCount >= 1 ? 'medium' : 'low';
|
|
110
|
-
const toolList = Array.from(tools);
|
|
111
|
-
return {
|
|
112
|
-
requiredTools: toolList,
|
|
113
|
-
recommendedTools: toolList,
|
|
114
|
-
detectedPatterns: patterns,
|
|
115
|
-
confidence,
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Format tool list for YAML output
|
|
120
|
-
*
|
|
121
|
-
* @param tools - Array of tool names
|
|
122
|
-
* @returns Formatted string for YAML tools field
|
|
123
|
-
*/
|
|
124
|
-
export function formatToolList(tools) {
|
|
125
|
-
if (tools.length === 0) {
|
|
126
|
-
return 'Read';
|
|
127
|
-
}
|
|
128
|
-
return tools.join(', ');
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Parse comma-separated tools string into array
|
|
132
|
-
*
|
|
133
|
-
* @param toolsString - Comma-separated tools (e.g., "Read, Write, Bash")
|
|
134
|
-
* @returns Array of tool names
|
|
135
|
-
*/
|
|
136
|
-
export function parseToolsString(toolsString) {
|
|
137
|
-
return toolsString
|
|
138
|
-
.split(',')
|
|
139
|
-
.map((t) => t.trim())
|
|
140
|
-
.filter((t) => t.length > 0);
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Validate that all tools in the list are recognized
|
|
144
|
-
*
|
|
145
|
-
* @param tools - Array of tool names to validate
|
|
146
|
-
* @returns Object with valid boolean and any unrecognized tools
|
|
147
|
-
*/
|
|
148
|
-
export function validateTools(tools) {
|
|
149
|
-
const validTools = new Set(Object.keys(TOOL_PATTERNS));
|
|
150
|
-
const unrecognized = tools.filter((t) => !validTools.has(t));
|
|
151
|
-
return {
|
|
152
|
-
valid: unrecognized.length === 0,
|
|
153
|
-
unrecognized,
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
//# sourceMappingURL=tool-analyzer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-analyzer.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