@herbertgao/pi-extensions 2026.9.17 → 2026.9.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -15
- package/node_modules/@herbertgao/pi-bark/package.json +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +4 -1
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +4 -1
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +75 -75
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-subagents/package.json +7 -7
- package/node_modules/@herbertgao/resume-from/package.json +4 -2
- package/node_modules/@herbertgao/sol-pi/package.json +6 -6
- package/node_modules/@juicesharp/rpiv-ask-user-question/package.json +99 -99
- package/node_modules/@pi-plugins/fast-mode/package.json +1 -1
- package/node_modules/@tifan/pi-handoff/package.json +1 -1
- package/node_modules/@tifan/pi-handoff/src/index.ts +56 -26
- package/node_modules/@tifan/pi-mermaid-open/package.json +1 -1
- package/node_modules/@tifan/pi-preferred-thinking/package.json +1 -1
- package/node_modules/@tifan/pi-recap/package.json +1 -1
- package/node_modules/@tifan/pi-rename/package.json +1 -1
- package/node_modules/pi-antigravity/package.json +2 -2
- package/node_modules/pi-lens/package.json +158 -158
- package/node_modules/pi-multi-account/package.json +2 -2
- package/node_modules/pi-typesafe/README.md +1 -1
- package/node_modules/pi-typesafe/dist/auth.d.ts +9 -5
- package/node_modules/pi-typesafe/dist/auth.js +7 -3
- package/node_modules/pi-typesafe/dist/backends.d.ts +33 -3
- package/node_modules/pi-typesafe/dist/backends.js +95 -1
- package/node_modules/pi-typesafe/dist/client.d.ts +5 -5
- package/node_modules/pi-typesafe/dist/client.js +12 -9
- package/node_modules/pi-typesafe/dist/credentials.d.ts +14 -8
- package/node_modules/pi-typesafe/dist/credentials.js +10 -7
- package/node_modules/pi-typesafe/dist/errors.d.ts +2 -2
- package/node_modules/pi-typesafe/dist/index.d.ts +2 -2
- package/node_modules/pi-typesafe/dist/index.js +1 -1
- package/node_modules/pi-typesafe/dist/login.d.ts +2 -2
- package/node_modules/pi-typesafe/dist/login.js +2 -2
- package/node_modules/pi-typesafe/package.json +5 -5
- package/node_modules/pi-web-access/package.json +2 -2
- package/node_modules/remote-pi/package.json +5 -1
- package/package.json +16 -28
- package/node_modules/pi-mcp-adapter/CHANGELOG.md +0 -1013
- package/node_modules/pi-mcp-adapter/LICENSE +0 -21
- package/node_modules/pi-mcp-adapter/OAUTH.md +0 -369
- package/node_modules/pi-mcp-adapter/README.md +0 -1021
- package/node_modules/pi-mcp-adapter/abort.ts +0 -34
- package/node_modules/pi-mcp-adapter/agent-dir.ts +0 -68
- package/node_modules/pi-mcp-adapter/agent-plugin-loader.ts +0 -416
- package/node_modules/pi-mcp-adapter/agent-plugin-provenance.ts +0 -36
- package/node_modules/pi-mcp-adapter/app-bridge.bundle.js +0 -67
- package/node_modules/pi-mcp-adapter/banner.png +0 -0
- package/node_modules/pi-mcp-adapter/bearer-command-resolver.ts +0 -193
- package/node_modules/pi-mcp-adapter/claude-plugin-loader.ts +0 -365
- package/node_modules/pi-mcp-adapter/cli.js +0 -454
- package/node_modules/pi-mcp-adapter/commands.ts +0 -861
- package/node_modules/pi-mcp-adapter/config.ts +0 -1565
- package/node_modules/pi-mcp-adapter/consent-manager.ts +0 -95
- package/node_modules/pi-mcp-adapter/direct-tool-surface.ts +0 -244
- package/node_modules/pi-mcp-adapter/direct-tools.ts +0 -428
- package/node_modules/pi-mcp-adapter/dist/abort.d.ts +0 -2
- package/node_modules/pi-mcp-adapter/dist/abort.js +0 -36
- package/node_modules/pi-mcp-adapter/dist/abort.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/agent-dir.d.ts +0 -10
- package/node_modules/pi-mcp-adapter/dist/agent-dir.js +0 -63
- package/node_modules/pi-mcp-adapter/dist/agent-dir.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/agent-plugin-loader.d.ts +0 -8
- package/node_modules/pi-mcp-adapter/dist/agent-plugin-loader.js +0 -398
- package/node_modules/pi-mcp-adapter/dist/agent-plugin-loader.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/agent-plugin-provenance.d.ts +0 -1
- package/node_modules/pi-mcp-adapter/dist/agent-plugin-provenance.js +0 -31
- package/node_modules/pi-mcp-adapter/dist/agent-plugin-provenance.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/bearer-command-resolver.d.ts +0 -6
- package/node_modules/pi-mcp-adapter/dist/bearer-command-resolver.js +0 -194
- package/node_modules/pi-mcp-adapter/dist/bearer-command-resolver.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/claude-plugin-loader.d.ts +0 -9
- package/node_modules/pi-mcp-adapter/dist/claude-plugin-loader.js +0 -362
- package/node_modules/pi-mcp-adapter/dist/claude-plugin-loader.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/config.d.ts +0 -134
- package/node_modules/pi-mcp-adapter/dist/config.js +0 -1361
- package/node_modules/pi-mcp-adapter/dist/config.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/consent-manager.d.ts +0 -18
- package/node_modules/pi-mcp-adapter/dist/consent-manager.js +0 -88
- package/node_modules/pi-mcp-adapter/dist/consent-manager.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/elicitation-handler.d.ts +0 -17
- package/node_modules/pi-mcp-adapter/dist/elicitation-handler.js +0 -316
- package/node_modules/pi-mcp-adapter/dist/elicitation-handler.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/errors.d.ts +0 -131
- package/node_modules/pi-mcp-adapter/dist/errors.js +0 -278
- package/node_modules/pi-mcp-adapter/dist/errors.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/http-ca.d.ts +0 -8
- package/node_modules/pi-mcp-adapter/dist/http-ca.js +0 -88
- package/node_modules/pi-mcp-adapter/dist/http-ca.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/jev-client.d.ts +0 -14
- package/node_modules/pi-mcp-adapter/dist/jev-client.js +0 -367
- package/node_modules/pi-mcp-adapter/dist/jev-client.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/jev-contracts.d.ts +0 -77
- package/node_modules/pi-mcp-adapter/dist/jev-contracts.js +0 -2
- package/node_modules/pi-mcp-adapter/dist/jev-contracts.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/jev-key-store.d.ts +0 -51
- package/node_modules/pi-mcp-adapter/dist/jev-key-store.js +0 -205
- package/node_modules/pi-mcp-adapter/dist/jev-key-store.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/json-schema-validator.d.ts +0 -2
- package/node_modules/pi-mcp-adapter/dist/json-schema-validator.js +0 -68
- package/node_modules/pi-mcp-adapter/dist/json-schema-validator.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/lifecycle.d.ts +0 -56
- package/node_modules/pi-mcp-adapter/dist/lifecycle.js +0 -410
- package/node_modules/pi-mcp-adapter/dist/lifecycle.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/logger.d.ts +0 -51
- package/node_modules/pi-mcp-adapter/dist/logger.js +0 -131
- package/node_modules/pi-mcp-adapter/dist/logger.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-auth-fetch.d.ts +0 -26
- package/node_modules/pi-mcp-adapter/dist/mcp-auth-fetch.js +0 -103
- package/node_modules/pi-mcp-adapter/dist/mcp-auth-fetch.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-auth-flow.d.ts +0 -118
- package/node_modules/pi-mcp-adapter/dist/mcp-auth-flow.js +0 -1097
- package/node_modules/pi-mcp-adapter/dist/mcp-auth-flow.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-auth.d.ts +0 -170
- package/node_modules/pi-mcp-adapter/dist/mcp-auth.js +0 -1142
- package/node_modules/pi-mcp-adapter/dist/mcp-auth.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-bearer-store.d.ts +0 -24
- package/node_modules/pi-mcp-adapter/dist/mcp-bearer-store.js +0 -203
- package/node_modules/pi-mcp-adapter/dist/mcp-bearer-store.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-callback-server.d.ts +0 -53
- package/node_modules/pi-mcp-adapter/dist/mcp-callback-server.js +0 -441
- package/node_modules/pi-mcp-adapter/dist/mcp-callback-server.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-oauth-provider.d.ts +0 -148
- package/node_modules/pi-mcp-adapter/dist/mcp-oauth-provider.js +0 -689
- package/node_modules/pi-mcp-adapter/dist/mcp-oauth-provider.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-probe.d.ts +0 -6
- package/node_modules/pi-mcp-adapter/dist/mcp-probe.js +0 -166
- package/node_modules/pi-mcp-adapter/dist/mcp-probe.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-tasks.d.ts +0 -102
- package/node_modules/pi-mcp-adapter/dist/mcp-tasks.js +0 -369
- package/node_modules/pi-mcp-adapter/dist/mcp-tasks.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/mcp-trace.d.ts +0 -95
- package/node_modules/pi-mcp-adapter/dist/mcp-trace.js +0 -242
- package/node_modules/pi-mcp-adapter/dist/mcp-trace.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/metadata-cache.d.ts +0 -19
- package/node_modules/pi-mcp-adapter/dist/metadata-cache.js +0 -301
- package/node_modules/pi-mcp-adapter/dist/metadata-cache.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/npx-resolver.d.ts +0 -6
- package/node_modules/pi-mcp-adapter/dist/npx-resolver.js +0 -505
- package/node_modules/pi-mcp-adapter/dist/npx-resolver.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/package-mcp-loader.d.ts +0 -2
- package/node_modules/pi-mcp-adapter/dist/package-mcp-loader.js +0 -144
- package/node_modules/pi-mcp-adapter/dist/package-mcp-loader.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/request-headers-command.d.ts +0 -10
- package/node_modules/pi-mcp-adapter/dist/request-headers-command.js +0 -312
- package/node_modules/pi-mcp-adapter/dist/request-headers-command.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/resource-tools.d.ts +0 -1
- package/node_modules/pi-mcp-adapter/dist/resource-tools.js +0 -15
- package/node_modules/pi-mcp-adapter/dist/resource-tools.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/runtime-owner.d.ts +0 -13
- package/node_modules/pi-mcp-adapter/dist/runtime-owner.js +0 -97
- package/node_modules/pi-mcp-adapter/dist/runtime-owner.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/sampling-handler.d.ts +0 -17
- package/node_modules/pi-mcp-adapter/dist/sampling-handler.js +0 -203
- package/node_modules/pi-mcp-adapter/dist/sampling-handler.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/secure-keyring.d.ts +0 -11
- package/node_modules/pi-mcp-adapter/dist/secure-keyring.js +0 -172
- package/node_modules/pi-mcp-adapter/dist/secure-keyring.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/server-manager.d.ts +0 -157
- package/node_modules/pi-mcp-adapter/dist/server-manager.js +0 -1745
- package/node_modules/pi-mcp-adapter/dist/server-manager.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/session-approvals.d.ts +0 -34
- package/node_modules/pi-mcp-adapter/dist/session-approvals.js +0 -140
- package/node_modules/pi-mcp-adapter/dist/session-approvals.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/session-recovery.d.ts +0 -26
- package/node_modules/pi-mcp-adapter/dist/session-recovery.js +0 -142
- package/node_modules/pi-mcp-adapter/dist/session-recovery.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/state.d.ts +0 -73
- package/node_modules/pi-mcp-adapter/dist/state.js +0 -2
- package/node_modules/pi-mcp-adapter/dist/state.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/types.d.ts +0 -642
- package/node_modules/pi-mcp-adapter/dist/types.js +0 -331
- package/node_modules/pi-mcp-adapter/dist/types.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/ui-app-bridge-helpers.d.ts +0 -6
- package/node_modules/pi-mcp-adapter/dist/ui-app-bridge-helpers.js +0 -37
- package/node_modules/pi-mcp-adapter/dist/ui-app-bridge-helpers.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/ui-resource-handler.d.ts +0 -17
- package/node_modules/pi-mcp-adapter/dist/ui-resource-handler.js +0 -219
- package/node_modules/pi-mcp-adapter/dist/ui-resource-handler.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/ui-stream-types.d.ts +0 -104
- package/node_modules/pi-mcp-adapter/dist/ui-stream-types.js +0 -59
- package/node_modules/pi-mcp-adapter/dist/ui-stream-types.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/ui-tool-visibility.d.ts +0 -4
- package/node_modules/pi-mcp-adapter/dist/ui-tool-visibility.js +0 -27
- package/node_modules/pi-mcp-adapter/dist/ui-tool-visibility.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/unix-socket-transport.d.ts +0 -15
- package/node_modules/pi-mcp-adapter/dist/unix-socket-transport.js +0 -85
- package/node_modules/pi-mcp-adapter/dist/unix-socket-transport.js.map +0 -1
- package/node_modules/pi-mcp-adapter/dist/utils.d.ts +0 -41
- package/node_modules/pi-mcp-adapter/dist/utils.js +0 -417
- package/node_modules/pi-mcp-adapter/dist/utils.js.map +0 -1
- package/node_modules/pi-mcp-adapter/elicitation-handler.ts +0 -358
- package/node_modules/pi-mcp-adapter/error-signal.ts +0 -32
- package/node_modules/pi-mcp-adapter/errors.ts +0 -364
- package/node_modules/pi-mcp-adapter/examples/jev-accessibility-loop.mjs +0 -85
- package/node_modules/pi-mcp-adapter/examples/jev-semantic-filter.mjs +0 -34
- package/node_modules/pi-mcp-adapter/failure-backoff.ts +0 -23
- package/node_modules/pi-mcp-adapter/glimpse-ui.ts +0 -80
- package/node_modules/pi-mcp-adapter/host-html-template.ts +0 -515
- package/node_modules/pi-mcp-adapter/http-ca.ts +0 -84
- package/node_modules/pi-mcp-adapter/index.ts +0 -2106
- package/node_modules/pi-mcp-adapter/init.ts +0 -721
- package/node_modules/pi-mcp-adapter/jev-client.ts +0 -300
- package/node_modules/pi-mcp-adapter/jev-contracts.ts +0 -53
- package/node_modules/pi-mcp-adapter/jev-key-store.ts +0 -192
- package/node_modules/pi-mcp-adapter/json-schema-validator.ts +0 -83
- package/node_modules/pi-mcp-adapter/lazy-loader.ts +0 -7
- package/node_modules/pi-mcp-adapter/lifecycle.ts +0 -457
- package/node_modules/pi-mcp-adapter/logger.ts +0 -169
- package/node_modules/pi-mcp-adapter/mcp-auth-fetch.ts +0 -113
- package/node_modules/pi-mcp-adapter/mcp-auth-flow.ts +0 -1296
- package/node_modules/pi-mcp-adapter/mcp-auth.ts +0 -1287
- package/node_modules/pi-mcp-adapter/mcp-bearer-store.ts +0 -250
- package/node_modules/pi-mcp-adapter/mcp-callback-server.ts +0 -534
- package/node_modules/pi-mcp-adapter/mcp-code.ts +0 -495
- package/node_modules/pi-mcp-adapter/mcp-install.ts +0 -60
- package/node_modules/pi-mcp-adapter/mcp-keyring-helper.cjs +0 -89
- package/node_modules/pi-mcp-adapter/mcp-oauth-provider.ts +0 -819
- package/node_modules/pi-mcp-adapter/mcp-output-guard.ts +0 -511
- package/node_modules/pi-mcp-adapter/mcp-panel-theme.ts +0 -104
- package/node_modules/pi-mcp-adapter/mcp-panel.ts +0 -1099
- package/node_modules/pi-mcp-adapter/mcp-probe.ts +0 -201
- package/node_modules/pi-mcp-adapter/mcp-references.ts +0 -373
- package/node_modules/pi-mcp-adapter/mcp-script-worker.mjs +0 -137
- package/node_modules/pi-mcp-adapter/mcp-setup-panel.ts +0 -747
- package/node_modules/pi-mcp-adapter/mcp-status.ts +0 -105
- package/node_modules/pi-mcp-adapter/mcp-tasks.ts +0 -467
- package/node_modules/pi-mcp-adapter/mcp-trace.ts +0 -306
- package/node_modules/pi-mcp-adapter/metadata-cache.ts +0 -362
- package/node_modules/pi-mcp-adapter/namespace-tools.ts +0 -334
- package/node_modules/pi-mcp-adapter/npx-resolver.ts +0 -543
- package/node_modules/pi-mcp-adapter/oauth-handler.ts +0 -30
- package/node_modules/pi-mcp-adapter/oauth.ts +0 -52
- package/node_modules/pi-mcp-adapter/onboarding-state.ts +0 -76
- package/node_modules/pi-mcp-adapter/package-mcp-loader.ts +0 -156
- package/node_modules/pi-mcp-adapter/package.json +0 -219
- package/node_modules/pi-mcp-adapter/panel-keys.ts +0 -53
- package/node_modules/pi-mcp-adapter/prompts.ts +0 -385
- package/node_modules/pi-mcp-adapter/proxy-modes.ts +0 -1735
- package/node_modules/pi-mcp-adapter/request-headers-command.ts +0 -333
- package/node_modules/pi-mcp-adapter/resource-tools.ts +0 -17
- package/node_modules/pi-mcp-adapter/runtime-owner.ts +0 -106
- package/node_modules/pi-mcp-adapter/sampling-handler.ts +0 -261
- package/node_modules/pi-mcp-adapter/sandbox-proxy-template.ts +0 -144
- package/node_modules/pi-mcp-adapter/search-ranking.ts +0 -309
- package/node_modules/pi-mcp-adapter/secure-keyring.ts +0 -170
- package/node_modules/pi-mcp-adapter/semantic-search.ts +0 -186
- package/node_modules/pi-mcp-adapter/server-manager.ts +0 -2088
- package/node_modules/pi-mcp-adapter/session-approvals.ts +0 -201
- package/node_modules/pi-mcp-adapter/session-recovery.ts +0 -158
- package/node_modules/pi-mcp-adapter/skills/mcp-scripting/SKILL.md +0 -49
- package/node_modules/pi-mcp-adapter/state.ts +0 -71
- package/node_modules/pi-mcp-adapter/tool-approval.ts +0 -205
- package/node_modules/pi-mcp-adapter/tool-metadata.ts +0 -302
- package/node_modules/pi-mcp-adapter/tool-registrar.ts +0 -255
- package/node_modules/pi-mcp-adapter/tool-result-renderer.ts +0 -573
- package/node_modules/pi-mcp-adapter/ts-shape.ts +0 -149
- package/node_modules/pi-mcp-adapter/types.ts +0 -1120
- package/node_modules/pi-mcp-adapter/ui-app-bridge-helpers.ts +0 -40
- package/node_modules/pi-mcp-adapter/ui-resource-handler.ts +0 -266
- package/node_modules/pi-mcp-adapter/ui-server.ts +0 -993
- package/node_modules/pi-mcp-adapter/ui-session.ts +0 -624
- package/node_modules/pi-mcp-adapter/ui-stream-types.ts +0 -89
- package/node_modules/pi-mcp-adapter/ui-tool-visibility.ts +0 -25
- package/node_modules/pi-mcp-adapter/unix-socket-transport.ts +0 -85
- package/node_modules/pi-mcp-adapter/utils.ts +0 -464
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bearer-command-resolver.js","sourceRoot":"","sources":["../bearer-command-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,cAAc,GAAG,CAAC,GAAG,MAAM,CAAC;AAClC,MAAM,UAAU,GAAG,sCAAsC,CAAC;AAC1D,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,wBAAwB,GAAG,IAAI,GAAG,IAAI,CAAC;AAC7C,MAAM,iBAAiB,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC;AAEvD,SAAS,mBAAmB;IAC1B,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,cAAc,CAAC,CAAC;IACjE,OAAO,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC;AAC9E,CAAC;AAED,SAAS,WAAW,CAAC,MAAmB;IACtC,OAAO,MAAM,CAAC,MAAM,IAAI,IAAI,YAAY,CAAC,2BAA2B,EAAE,YAAY,CAAC,CAAC;AACtF,CAAC;AAED,SAAS,UAAU,CAAC,OAAe,EAAE,OAAe,EAAE,MAAmB;IACvE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,MAAM,GAAG,MA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D,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,QAAkB,EAAE,MAAoB;QAC5C,QAAQ,CAAC,OAAO,EAAE,CAAC;QACnB,IAAI,OAAiC,CAAC;QACtC,MAAM,MAAM,GAAG,MAAM,KAAK,SAAS;YACjC,CAAC,CAAC,QAAQ,CAAC,OAAO;YAClB,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;gBACX,QAAQ,CAAC,OAAO;gBAChB,IAAI,OAAO,CAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE;oBACvC,OAAO,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;oBAC5C,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC5D,CAAC,CAAC;aACH,CAAC,CAAC;QACP,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE;YACzB,IAAI,OAAO;gBAAE,MAAO,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC3D,QAAQ,CAAC,OAAO,EAAE,CAAC;YACnB,IAAI,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,KAAK,CAAC,EAAE,CAAC;gBAC1D,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;gBAC3B,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAC5C,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ClaudePluginConfig, type McpConfig, type ServerEntry } from "./types.ts";
|
|
2
|
-
export interface ClaudePluginBundleResult {
|
|
3
|
-
mcpServers: Record<string, ServerEntry>;
|
|
4
|
-
skillPaths: string[];
|
|
5
|
-
}
|
|
6
|
-
export declare function loadClaudePluginBundles(plugins: readonly ClaudePluginConfig[] | undefined, cwd: string, validateConfig: (raw: unknown) => McpConfig, components: {
|
|
7
|
-
mcp: boolean;
|
|
8
|
-
skills: boolean;
|
|
9
|
-
}): ClaudePluginBundleResult;
|
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
import { closeSync, constants, existsSync, fstatSync, openSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
2
|
-
import { basename, isAbsolute, relative, resolve, sep } from "node:path";
|
|
3
|
-
import { formatServerNamespace } from "./types.js";
|
|
4
|
-
import { parseJsonWithComments } from "./utils.js";
|
|
5
|
-
export function loadClaudePluginBundles(plugins, cwd, validateConfig, components) {
|
|
6
|
-
const mcpServers = {};
|
|
7
|
-
const skillPaths = [];
|
|
8
|
-
const seenRoots = new Set();
|
|
9
|
-
const seenNames = new Map();
|
|
10
|
-
const serverSources = new Map();
|
|
11
|
-
const normalizedServerNames = new Map();
|
|
12
|
-
for (const plugin of plugins ?? []) {
|
|
13
|
-
const configuredPath = resolvePluginPath(plugin.path, cwd);
|
|
14
|
-
const pluginRoot = resolvePluginRoot(configuredPath);
|
|
15
|
-
if (!pluginRoot)
|
|
16
|
-
continue;
|
|
17
|
-
if (seenRoots.has(pluginRoot)) {
|
|
18
|
-
console.warn(`Claude plugin path is configured more than once: ${pluginRoot}`);
|
|
19
|
-
continue;
|
|
20
|
-
}
|
|
21
|
-
seenRoots.add(pluginRoot);
|
|
22
|
-
const manifest = readPluginManifest(pluginRoot);
|
|
23
|
-
if (manifest === false)
|
|
24
|
-
continue;
|
|
25
|
-
const pluginName = manifest?.name ?? basename(pluginRoot);
|
|
26
|
-
const previousPluginRoot = seenNames.get(pluginName);
|
|
27
|
-
if (previousPluginRoot && previousPluginRoot !== pluginRoot) {
|
|
28
|
-
console.warn(`Claude plugin name conflict for "${pluginName}": ${previousPluginRoot} and ${pluginRoot}`);
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
seenNames.set(pluginName, pluginRoot);
|
|
32
|
-
}
|
|
33
|
-
if (components.mcp && plugin.mcp === true) {
|
|
34
|
-
const configPath = resolveContainedComponent(pluginRoot, ".mcp.json", "file", pluginName);
|
|
35
|
-
if (configPath) {
|
|
36
|
-
const config = readPluginMcpConfig(configPath, pluginName, pluginRoot, validateConfig);
|
|
37
|
-
for (const [serverName, server] of Object.entries(config.mcpServers)) {
|
|
38
|
-
const normalizedName = formatServerNamespace(serverName);
|
|
39
|
-
const previousName = normalizedServerNames.get(normalizedName);
|
|
40
|
-
const previousSource = previousName ? serverSources.get(previousName) : undefined;
|
|
41
|
-
if (previousName && previousSource) {
|
|
42
|
-
console.warn(`Claude plugin MCP server name conflict for "${serverName}": normalized name collides with "${previousName}" from ${previousSource}; the first plugin wins over ${configPath}`);
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
normalizedServerNames.set(normalizedName, serverName);
|
|
46
|
-
serverSources.set(serverName, configPath);
|
|
47
|
-
mcpServers[serverName] = server;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
if (components.skills && plugin.skills === true) {
|
|
52
|
-
const skillsPath = resolveContainedComponent(pluginRoot, "skills", "directory", pluginName);
|
|
53
|
-
if (skillsPath) {
|
|
54
|
-
try {
|
|
55
|
-
for (const skillPath of discoverContainedSkillFiles(skillsPath, pluginName)) {
|
|
56
|
-
if (!skillPaths.includes(skillPath))
|
|
57
|
-
skillPaths.push(skillPath);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
catch (error) {
|
|
61
|
-
console.warn(`Claude plugin "${pluginName}" skills could not be read at ${skillsPath}: ${formatError(error)}`);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return { mcpServers, skillPaths };
|
|
67
|
-
}
|
|
68
|
-
function resolvePluginPath(path, cwd) {
|
|
69
|
-
if (path === "~")
|
|
70
|
-
return resolve(process.env.HOME ?? "", ".");
|
|
71
|
-
if (path.startsWith("~/"))
|
|
72
|
-
return resolve(process.env.HOME ?? "", path.slice(2));
|
|
73
|
-
return isAbsolute(path) ? resolve(path) : resolve(cwd, path);
|
|
74
|
-
}
|
|
75
|
-
function resolvePluginRoot(path) {
|
|
76
|
-
if (!existsSync(path)) {
|
|
77
|
-
console.warn(`Claude plugin path does not exist: ${path}`);
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
const stats = safeStat(path, "Claude plugin path");
|
|
81
|
-
if (!stats)
|
|
82
|
-
return null;
|
|
83
|
-
if (!stats.isDirectory()) {
|
|
84
|
-
console.warn(`Claude plugin path is not a directory: ${path}`);
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
return safeRealpath(path, "Claude plugin path");
|
|
88
|
-
}
|
|
89
|
-
function readPluginManifest(pluginRoot) {
|
|
90
|
-
const configuredManifestPath = resolve(pluginRoot, ".claude-plugin", "plugin.json");
|
|
91
|
-
if (!existsSync(configuredManifestPath))
|
|
92
|
-
return null;
|
|
93
|
-
const stats = safeStat(configuredManifestPath, "Claude plugin manifest");
|
|
94
|
-
if (!stats)
|
|
95
|
-
return null;
|
|
96
|
-
if (!stats.isFile()) {
|
|
97
|
-
console.warn(`Claude plugin manifest is not a regular file: ${configuredManifestPath}`);
|
|
98
|
-
return false;
|
|
99
|
-
}
|
|
100
|
-
const manifestPath = safeRealpath(configuredManifestPath, "Claude plugin manifest");
|
|
101
|
-
if (!manifestPath)
|
|
102
|
-
return null;
|
|
103
|
-
if (!isContainedPath(pluginRoot, manifestPath)) {
|
|
104
|
-
console.warn(`Claude plugin manifest resolves outside the configured plugin directory: ${manifestPath}`);
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
const manifestText = safeReadFile(manifestPath, "Claude plugin manifest", pluginRoot);
|
|
108
|
-
if (manifestText === null)
|
|
109
|
-
return null;
|
|
110
|
-
let raw;
|
|
111
|
-
try {
|
|
112
|
-
raw = parseJsonWithComments(manifestText);
|
|
113
|
-
}
|
|
114
|
-
catch (error) {
|
|
115
|
-
console.warn(`Claude plugin manifest contains invalid JSON at ${manifestPath}: ${formatError(error)}`);
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
119
|
-
console.warn(`Claude plugin manifest must be a JSON object: ${manifestPath}`);
|
|
120
|
-
return false;
|
|
121
|
-
}
|
|
122
|
-
const manifest = raw;
|
|
123
|
-
if (typeof manifest.name !== "string" || !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(manifest.name)) {
|
|
124
|
-
console.warn(`Claude plugin manifest has an invalid name at ${manifestPath}: expected kebab-case`);
|
|
125
|
-
return false;
|
|
126
|
-
}
|
|
127
|
-
if (!hasValidManifestFieldTypes(manifest)) {
|
|
128
|
-
console.warn(`Claude plugin manifest has invalid field types at ${manifestPath}`);
|
|
129
|
-
return false;
|
|
130
|
-
}
|
|
131
|
-
return { name: manifest.name };
|
|
132
|
-
}
|
|
133
|
-
function hasValidManifestFieldTypes(manifest) {
|
|
134
|
-
for (const field of ["$schema", "displayName", "version", "description", "homepage", "repository", "license"]) {
|
|
135
|
-
if (manifest[field] !== undefined && typeof manifest[field] !== "string")
|
|
136
|
-
return false;
|
|
137
|
-
}
|
|
138
|
-
for (const field of ["commands", "agents", "skills", "hooks", "mcpServers", "lspServers", "outputStyles"]) {
|
|
139
|
-
const value = manifest[field];
|
|
140
|
-
if (value !== undefined && typeof value !== "string" && (!Array.isArray(value) || value.some(item => typeof item !== "string")))
|
|
141
|
-
return false;
|
|
142
|
-
}
|
|
143
|
-
if (manifest.defaultEnabled !== undefined && typeof manifest.defaultEnabled !== "boolean")
|
|
144
|
-
return false;
|
|
145
|
-
if (manifest.keywords !== undefined && (!Array.isArray(manifest.keywords) || manifest.keywords.some(value => typeof value !== "string")))
|
|
146
|
-
return false;
|
|
147
|
-
if (manifest.author !== undefined) {
|
|
148
|
-
if (!manifest.author || typeof manifest.author !== "object" || Array.isArray(manifest.author))
|
|
149
|
-
return false;
|
|
150
|
-
const author = manifest.author;
|
|
151
|
-
if (typeof author.name !== "string")
|
|
152
|
-
return false;
|
|
153
|
-
if (author.email !== undefined && typeof author.email !== "string")
|
|
154
|
-
return false;
|
|
155
|
-
if (author.url !== undefined && typeof author.url !== "string")
|
|
156
|
-
return false;
|
|
157
|
-
}
|
|
158
|
-
if (manifest.metadata !== undefined && (!manifest.metadata || typeof manifest.metadata !== "object" || Array.isArray(manifest.metadata)))
|
|
159
|
-
return false;
|
|
160
|
-
return true;
|
|
161
|
-
}
|
|
162
|
-
function resolveContainedComponent(pluginRoot, component, expected, pluginName) {
|
|
163
|
-
const path = resolve(pluginRoot, component);
|
|
164
|
-
if (!existsSync(path)) {
|
|
165
|
-
console.warn(`Claude plugin "${pluginName}" is missing ${component}: ${path}`);
|
|
166
|
-
return null;
|
|
167
|
-
}
|
|
168
|
-
const stats = safeStat(path, `Claude plugin "${pluginName}" ${component}`);
|
|
169
|
-
if (!stats)
|
|
170
|
-
return null;
|
|
171
|
-
if (expected === "file" ? !stats.isFile() : !stats.isDirectory()) {
|
|
172
|
-
console.warn(`Claude plugin "${pluginName}" ${component} is not a ${expected}: ${path}`);
|
|
173
|
-
return null;
|
|
174
|
-
}
|
|
175
|
-
const realPath = safeRealpath(path, `Claude plugin "${pluginName}" ${component}`);
|
|
176
|
-
if (!realPath)
|
|
177
|
-
return null;
|
|
178
|
-
if (!isContainedPath(pluginRoot, realPath)) {
|
|
179
|
-
console.warn(`Claude plugin "${pluginName}" ${component} resolves outside the configured plugin directory: ${realPath}`);
|
|
180
|
-
return null;
|
|
181
|
-
}
|
|
182
|
-
return realPath;
|
|
183
|
-
}
|
|
184
|
-
function discoverContainedSkillFiles(skillsRoot, pluginName) {
|
|
185
|
-
const skillFiles = [];
|
|
186
|
-
const visitedDirectories = new Set();
|
|
187
|
-
const visit = (directory) => {
|
|
188
|
-
const realDirectory = safeRealpath(directory, `Claude plugin "${pluginName}" skill directory`);
|
|
189
|
-
if (!realDirectory)
|
|
190
|
-
return;
|
|
191
|
-
if (!isContainedPath(skillsRoot, realDirectory)) {
|
|
192
|
-
console.warn(`Claude plugin "${pluginName}" skill path resolves outside its skills directory: ${directory} -> ${realDirectory}`);
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
if (visitedDirectories.has(realDirectory))
|
|
196
|
-
return;
|
|
197
|
-
visitedDirectories.add(realDirectory);
|
|
198
|
-
const entries = safeReadDir(realDirectory, `Claude plugin "${pluginName}" skill directory`);
|
|
199
|
-
if (!entries)
|
|
200
|
-
return;
|
|
201
|
-
for (const entry of entries.sort((left, right) => left.name.localeCompare(right.name))) {
|
|
202
|
-
const path = resolve(realDirectory, entry.name);
|
|
203
|
-
if (entry.isSymbolicLink()) {
|
|
204
|
-
const target = safeRealpath(path, `Claude plugin "${pluginName}" skill path`);
|
|
205
|
-
if (!target)
|
|
206
|
-
continue;
|
|
207
|
-
if (!isContainedPath(skillsRoot, target)) {
|
|
208
|
-
console.warn(`Claude plugin "${pluginName}" skill path resolves outside its skills directory: ${path} -> ${target}`);
|
|
209
|
-
continue;
|
|
210
|
-
}
|
|
211
|
-
const targetStats = safeStat(target, `Claude plugin "${pluginName}" skill path`);
|
|
212
|
-
if (!targetStats)
|
|
213
|
-
continue;
|
|
214
|
-
if (targetStats.isDirectory())
|
|
215
|
-
visit(target);
|
|
216
|
-
else if (targetStats.isFile() && entry.name === "SKILL.md")
|
|
217
|
-
skillFiles.push(target);
|
|
218
|
-
}
|
|
219
|
-
else if (entry.isDirectory()) {
|
|
220
|
-
visit(path);
|
|
221
|
-
}
|
|
222
|
-
else if (entry.isFile() && entry.name === "SKILL.md") {
|
|
223
|
-
const realPath = safeRealpath(path, `Claude plugin "${pluginName}" skill path`);
|
|
224
|
-
if (!realPath)
|
|
225
|
-
continue;
|
|
226
|
-
if (!isContainedPath(skillsRoot, realPath)) {
|
|
227
|
-
console.warn(`Claude plugin "${pluginName}" skill path resolves outside its skills directory: ${path} -> ${realPath}`);
|
|
228
|
-
continue;
|
|
229
|
-
}
|
|
230
|
-
skillFiles.push(realPath);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
visit(skillsRoot);
|
|
235
|
-
return skillFiles;
|
|
236
|
-
}
|
|
237
|
-
function readPluginMcpConfig(configPath, pluginName, pluginRoot, validateConfig) {
|
|
238
|
-
let raw;
|
|
239
|
-
try {
|
|
240
|
-
const configText = safeReadFile(configPath, `Claude plugin "${pluginName}" MCP config`, pluginRoot);
|
|
241
|
-
if (configText === null)
|
|
242
|
-
return { mcpServers: {} };
|
|
243
|
-
raw = parseJsonWithComments(configText);
|
|
244
|
-
}
|
|
245
|
-
catch (error) {
|
|
246
|
-
console.warn(`Claude plugin "${pluginName}" has invalid MCP config at ${configPath}: ${formatError(error)}`);
|
|
247
|
-
return { mcpServers: {} };
|
|
248
|
-
}
|
|
249
|
-
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
250
|
-
console.warn(`Claude plugin "${pluginName}" MCP config must be a JSON object: ${configPath}`);
|
|
251
|
-
return { mcpServers: {} };
|
|
252
|
-
}
|
|
253
|
-
const servers = raw.mcpServers;
|
|
254
|
-
if (!servers || typeof servers !== "object" || Array.isArray(servers)) {
|
|
255
|
-
console.warn(`Claude plugin "${pluginName}" MCP config must contain an mcpServers object: ${configPath}`);
|
|
256
|
-
return { mcpServers: {} };
|
|
257
|
-
}
|
|
258
|
-
const config = validateConfig(raw);
|
|
259
|
-
const validated = {};
|
|
260
|
-
for (const serverName of Object.keys(servers)) {
|
|
261
|
-
if (serverName.trim().length === 0) {
|
|
262
|
-
console.warn(`Claude plugin "${pluginName}" has an empty MCP server name at ${configPath}`);
|
|
263
|
-
continue;
|
|
264
|
-
}
|
|
265
|
-
const parsed = config.mcpServers[serverName];
|
|
266
|
-
if (!parsed || !hasValidServerTransport(parsed)) {
|
|
267
|
-
console.warn(`Claude plugin "${pluginName}" has invalid MCP server "${serverName}" at ${configPath}: expected exactly one non-empty command, url, or socket transport`);
|
|
268
|
-
continue;
|
|
269
|
-
}
|
|
270
|
-
validated[serverName] = replacePluginRoot(parsed, pluginRoot);
|
|
271
|
-
}
|
|
272
|
-
return { mcpServers: validated };
|
|
273
|
-
}
|
|
274
|
-
function hasValidServerTransport(entry) {
|
|
275
|
-
return [entry.command, entry.url, entry.socket].filter(value => typeof value === "string" && value.trim().length > 0).length === 1;
|
|
276
|
-
}
|
|
277
|
-
function replacePluginRoot(entry, pluginRoot) {
|
|
278
|
-
const replace = (value) => value.replaceAll("${CLAUDE_PLUGIN_ROOT}", pluginRoot);
|
|
279
|
-
const replaced = replaceStrings(entry, replace);
|
|
280
|
-
if (typeof replaced.command === "string") {
|
|
281
|
-
replaced.env = { ...replaced.env, CLAUDE_PLUGIN_ROOT: pluginRoot };
|
|
282
|
-
}
|
|
283
|
-
return replaced;
|
|
284
|
-
}
|
|
285
|
-
function replaceStrings(value, replace) {
|
|
286
|
-
if (typeof value === "string")
|
|
287
|
-
return replace(value);
|
|
288
|
-
if (Array.isArray(value))
|
|
289
|
-
return value.map(item => replaceStrings(item, replace));
|
|
290
|
-
if (!value || typeof value !== "object")
|
|
291
|
-
return value;
|
|
292
|
-
return Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, replaceStrings(entry, replace)]));
|
|
293
|
-
}
|
|
294
|
-
function isContainedPath(root, path) {
|
|
295
|
-
const rel = relative(root, path);
|
|
296
|
-
return rel === "" || (!rel.startsWith("..") && !rel.startsWith(sep) && !isAbsolute(rel));
|
|
297
|
-
}
|
|
298
|
-
function safeStat(path, description) {
|
|
299
|
-
try {
|
|
300
|
-
return statSync(path);
|
|
301
|
-
}
|
|
302
|
-
catch (error) {
|
|
303
|
-
console.warn(`${description} could not be read: ${path}: ${formatError(error)}`);
|
|
304
|
-
return null;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
function safeRealpath(path, description) {
|
|
308
|
-
try {
|
|
309
|
-
return realpathSync(path);
|
|
310
|
-
}
|
|
311
|
-
catch (error) {
|
|
312
|
-
console.warn(`${description} could not be read: ${path}: ${formatError(error)}`);
|
|
313
|
-
return null;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
function safeReadFile(path, description, containmentRoot) {
|
|
317
|
-
let fd;
|
|
318
|
-
try {
|
|
319
|
-
fd = openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
320
|
-
const openedStats = fstatSync(fd);
|
|
321
|
-
if (!openedStats.isFile()) {
|
|
322
|
-
console.warn(`${description} is not a regular file: ${path}`);
|
|
323
|
-
return null;
|
|
324
|
-
}
|
|
325
|
-
const resolvedPath = safeRealpath(path, description);
|
|
326
|
-
if (!resolvedPath)
|
|
327
|
-
return null;
|
|
328
|
-
if (!isContainedPath(containmentRoot, resolvedPath)) {
|
|
329
|
-
console.warn(`${description} resolves outside the configured plugin directory: ${resolvedPath}`);
|
|
330
|
-
return null;
|
|
331
|
-
}
|
|
332
|
-
const currentStats = safeStat(resolvedPath, description);
|
|
333
|
-
if (!currentStats)
|
|
334
|
-
return null;
|
|
335
|
-
if (openedStats.dev !== currentStats.dev || openedStats.ino !== currentStats.ino) {
|
|
336
|
-
console.warn(`${description} changed while being read: ${path}`);
|
|
337
|
-
return null;
|
|
338
|
-
}
|
|
339
|
-
return readFileSync(fd, "utf8");
|
|
340
|
-
}
|
|
341
|
-
catch (error) {
|
|
342
|
-
console.warn(`${description} could not be read: ${path}: ${formatError(error)}`);
|
|
343
|
-
return null;
|
|
344
|
-
}
|
|
345
|
-
finally {
|
|
346
|
-
if (fd !== undefined)
|
|
347
|
-
closeSync(fd);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
function safeReadDir(path, description) {
|
|
351
|
-
try {
|
|
352
|
-
return readdirSync(path, { withFileTypes: true });
|
|
353
|
-
}
|
|
354
|
-
catch (error) {
|
|
355
|
-
console.warn(`${description} could not be read: ${path}: ${formatError(error)}`);
|
|
356
|
-
return null;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
function formatError(error) {
|
|
360
|
-
return error instanceof Error ? error.message : String(error);
|
|
361
|
-
}
|
|
362
|
-
//# sourceMappingURL=claude-plugin-loader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claude-plugin-loader.js","sourceRoot":"","sources":["../claude-plugin-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAA2B,MAAM,SAAS,CAAC;AAC5J,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAA6D,MAAM,YAAY,CAAC;AAC9G,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAWnD,MAAM,UAAU,uBAAuB,CACrC,OAAkD,EAClD,GAAW,EACX,cAA2C,EAC3C,UAA6C;IAE7C,MAAM,UAAU,GAAgC,EAAE,CAAC;IACnD,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAU,CAAC;IACpC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC5C,MAAM,aAAa,GAAG,IAAI,GAAG,EAAkB,CAAC;IAChD,MAAM,qBAAqB,GAAG,IAAI,GAAG,EAAkB,CAAC;IAExD,KAAK,MAAM,MAAM,IAAI,OAAO,IAAI,EAAE,EAAE,CAAC;QACnC,MAAM,cAAc,GAAG,iBAAiB,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC3D,MAAM,UAAU,GAAG,iBAAiB,CAAC,cAAc,CAAC,CAAC;QACrD,IAAI,CAAC,UAAU;YAAE,SAAS;QAC1B,IAAI,SAAS,CAAC,GAAG,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AC,IAAY,EAAE,WAAmB;IACpD,IAAI,CAAC;QACH,OAAO,WAAW,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,GAAG,WAAW,uBAAuB,IAAI,KAAK,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACjF,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { type AgentPluginSummary } from "./agent-plugin-loader.ts";
|
|
2
|
-
import { type HostConfigDiscovery, type McpConfig, type ServerEntry, type ImportKind, type ServerProvenance } from "./types.ts";
|
|
3
|
-
export interface KnownServerPreset {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
summary: string;
|
|
7
|
-
entry: ServerEntry;
|
|
8
|
-
}
|
|
9
|
-
export declare const KNOWN_SERVER_PRESETS: readonly KnownServerPreset[];
|
|
10
|
-
interface ConfigSourceSpec {
|
|
11
|
-
id: "shared-global" | "agents-global" | "agents-nested-global" | "pi-global" | "shared-project-ancestor" | "pi-project-ancestor" | "shared-project" | "pi-project";
|
|
12
|
-
label: string;
|
|
13
|
-
readPath: string;
|
|
14
|
-
writePath: string;
|
|
15
|
-
kind: "user" | "project" | "import";
|
|
16
|
-
importKind?: string;
|
|
17
|
-
shared: boolean;
|
|
18
|
-
scope: "global" | "project";
|
|
19
|
-
}
|
|
20
|
-
export interface ConfigDiscoveryPath {
|
|
21
|
-
label: string;
|
|
22
|
-
path: string;
|
|
23
|
-
exists: boolean;
|
|
24
|
-
}
|
|
25
|
-
export interface DiscoveredImportConfig {
|
|
26
|
-
kind: ImportKind;
|
|
27
|
-
path: string;
|
|
28
|
-
}
|
|
29
|
-
export interface ConfigDiscoverySource extends ConfigDiscoveryPath {
|
|
30
|
-
id: ConfigSourceSpec["id"];
|
|
31
|
-
scope: ConfigSourceSpec["scope"];
|
|
32
|
-
kind: "shared" | "pi";
|
|
33
|
-
serverCount: number;
|
|
34
|
-
}
|
|
35
|
-
export interface ImportConfigSummary extends DiscoveredImportConfig {
|
|
36
|
-
serverCount: number;
|
|
37
|
-
}
|
|
38
|
-
export interface HostConfigSummary extends ImportConfigSummary {
|
|
39
|
-
active: boolean;
|
|
40
|
-
}
|
|
41
|
-
export interface McpConfigConflict {
|
|
42
|
-
serverName: string;
|
|
43
|
-
sources: Array<{
|
|
44
|
-
kind: "shared" | "pi" | "host";
|
|
45
|
-
path: string;
|
|
46
|
-
}>;
|
|
47
|
-
winner: {
|
|
48
|
-
kind: "shared" | "pi" | "host";
|
|
49
|
-
path: string;
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
export interface RepoPromptDiscovery {
|
|
53
|
-
configured: boolean;
|
|
54
|
-
configuredPath?: string;
|
|
55
|
-
executablePath?: string;
|
|
56
|
-
targetPath?: string;
|
|
57
|
-
serverName?: string;
|
|
58
|
-
entry?: ServerEntry;
|
|
59
|
-
}
|
|
60
|
-
export interface McpDiscoverySummary {
|
|
61
|
-
sources: ConfigDiscoverySource[];
|
|
62
|
-
imports: ImportConfigSummary[];
|
|
63
|
-
hostConfigs: HostConfigSummary[];
|
|
64
|
-
hostConfigDiscovery: HostConfigDiscovery;
|
|
65
|
-
agentPlugins: AgentPluginSummary[];
|
|
66
|
-
conflicts: McpConfigConflict[];
|
|
67
|
-
hasAnyConfig: boolean;
|
|
68
|
-
hasAnyDetectedPaths: boolean;
|
|
69
|
-
hasSharedServers: boolean;
|
|
70
|
-
hasPiOwnedServers: boolean;
|
|
71
|
-
totalServerCount: number;
|
|
72
|
-
fingerprint: string;
|
|
73
|
-
repoPrompt: RepoPromptDiscovery;
|
|
74
|
-
}
|
|
75
|
-
export interface McpStandardConfigSummary {
|
|
76
|
-
sources: ConfigDiscoverySource[];
|
|
77
|
-
hasSharedServers: boolean;
|
|
78
|
-
fingerprint: string;
|
|
79
|
-
}
|
|
80
|
-
export interface ConfigWritePreview {
|
|
81
|
-
path: string;
|
|
82
|
-
existed: boolean;
|
|
83
|
-
changed: boolean;
|
|
84
|
-
beforeText: string;
|
|
85
|
-
afterText: string;
|
|
86
|
-
diffText: string;
|
|
87
|
-
}
|
|
88
|
-
export type SharedConfigTarget = "project" | "global";
|
|
89
|
-
export declare function getPiGlobalConfigPath(overridePath?: string): string;
|
|
90
|
-
export declare function getGenericGlobalConfigPath(): string;
|
|
91
|
-
export declare function getProjectConfigPath(cwd?: string): string;
|
|
92
|
-
export declare function getProjectPiConfigPath(cwd?: string): string;
|
|
93
|
-
export declare function getSharedConfigPath(target: SharedConfigTarget, cwd?: string): string;
|
|
94
|
-
export declare function getConfigDiscoveryPaths(overridePath?: string, cwd?: string): ConfigDiscoveryPath[];
|
|
95
|
-
export declare function findAvailableImportConfigs(cwd?: string): DiscoveredImportConfig[];
|
|
96
|
-
export declare function getMcpStandardConfigSummary(overridePath?: string, cwd?: string): McpStandardConfigSummary;
|
|
97
|
-
export declare function getMcpDiscoverySummary(overridePath?: string, cwd?: string, options?: {
|
|
98
|
-
includeHostConfigs?: boolean;
|
|
99
|
-
}): McpDiscoverySummary;
|
|
100
|
-
export declare function cloneMcpConfig(config: McpConfig): McpConfig;
|
|
101
|
-
export declare function loadMcpConfig(overridePath?: string, cwd?: string): McpConfig;
|
|
102
|
-
export declare function resolveConfiguredClaudePluginMcp(config: McpConfig, cwd?: string): McpConfig;
|
|
103
|
-
export declare function discoverConfiguredClaudePluginSkills(config: McpConfig, cwd?: string): string[];
|
|
104
|
-
export declare function writeSharedConfigText(filePath: string, text: string): void;
|
|
105
|
-
export declare function writeJevSemanticSearchConfig(overridePath: string | undefined, cwd: string, allowedServers: string[], effectiveJev?: unknown): {
|
|
106
|
-
path: string;
|
|
107
|
-
changed: boolean;
|
|
108
|
-
};
|
|
109
|
-
export interface ServerDisabledOverrideResult {
|
|
110
|
-
path: string;
|
|
111
|
-
changed: boolean;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Persist only the disabled field in the project Pi layer. Enabling writes an
|
|
115
|
-
* explicit false only when a lower-precedence source is itself disabled; this
|
|
116
|
-
* writer never copies a server definition or its credentials into the file.
|
|
117
|
-
*/
|
|
118
|
-
export declare function writeProjectServerDisabledOverride(overridePath: string | undefined, cwd: string, serverName: string, disabled: boolean): ServerDisabledOverrideResult;
|
|
119
|
-
export declare function previewCompatibilityImports(importKinds: ImportKind[], overridePath?: string): ConfigWritePreview;
|
|
120
|
-
export declare function ensureCompatibilityImports(importKinds: ImportKind[], overridePath?: string): {
|
|
121
|
-
path: string;
|
|
122
|
-
added: ImportKind[];
|
|
123
|
-
};
|
|
124
|
-
export declare function buildStarterProjectConfig(): McpConfig;
|
|
125
|
-
export declare function previewStarterSharedConfig(target: SharedConfigTarget, cwd?: string): ConfigWritePreview;
|
|
126
|
-
export declare function writeStarterSharedConfig(target: SharedConfigTarget, cwd?: string): string;
|
|
127
|
-
export declare function previewStarterProjectConfig(cwd?: string): ConfigWritePreview;
|
|
128
|
-
export declare function writeStarterProjectConfig(cwd?: string): string;
|
|
129
|
-
export declare function previewSharedServerEntry(filePath: string, serverName: string, entry: ServerEntry): ConfigWritePreview;
|
|
130
|
-
export declare function writeSharedServerEntry(filePath: string, serverName: string, entry: ServerEntry): string;
|
|
131
|
-
export declare function getServerProvenance(overridePath?: string, cwd?: string): Map<string, ServerProvenance>;
|
|
132
|
-
export declare function writeDirectToolsConfig(changes: Map<string, true | string[] | false>, provenance: Map<string, ServerProvenance>, fullConfig: McpConfig): void;
|
|
133
|
-
export declare function resolveConfiguredOAuthDir(raw: unknown, cwd?: string): string | undefined;
|
|
134
|
-
export {};
|