@cyanmycelium/mcp-broker 1.3.0 → 1.3.1
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/dist/bin.js +1 -1
- package/dist/{chunk-BZUZYXVA.js → chunk-UOJRDF5R.js} +27 -2
- package/dist/chunk-UOJRDF5R.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/broker/aggregate/aggregate.server.ts +10 -0
- package/src/ws/ws.tunnel.ts +18 -1
- package/dist/chunk-BZUZYXVA.js.map +0 -1
package/dist/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { PACKAGE_NAME, VERSION, loadBrokerConfig, WsTunnelBuilder, loadMcpbBundle, BROKER_AGGREGATE_NAME, BROKER_PROVIDER_NAME, resolveOpenTarget } from './chunk-
|
|
2
|
+
import { PACKAGE_NAME, VERSION, loadBrokerConfig, WsTunnelBuilder, loadMcpbBundle, BROKER_AGGREGATE_NAME, BROKER_PROVIDER_NAME, resolveOpenTarget } from './chunk-UOJRDF5R.js';
|
|
3
3
|
import * as fs from 'fs';
|
|
4
4
|
import * as path from 'path';
|
|
5
5
|
import open from 'open';
|
|
@@ -3002,6 +3002,15 @@ var AggregateServer = class _AggregateServer {
|
|
|
3002
3002
|
this.removeProvider(name);
|
|
3003
3003
|
}
|
|
3004
3004
|
}
|
|
3005
|
+
/**
|
|
3006
|
+
* Slot names currently contributing to the aggregate, in registration
|
|
3007
|
+
* order. A provider whose handshake failed is not in it: `addProvider`
|
|
3008
|
+
* removed it. This is what `broker_diagnose` reads through
|
|
3009
|
+
* `IBrokerContext.getAggregateInfo()`.
|
|
3010
|
+
*/
|
|
3011
|
+
get providerNames() {
|
|
3012
|
+
return [...this._sessions.keys()];
|
|
3013
|
+
}
|
|
3005
3014
|
/** Removes a provider from the aggregate. */
|
|
3006
3015
|
removeProvider(name) {
|
|
3007
3016
|
const session = this._sessions.get(name);
|
|
@@ -3700,6 +3709,22 @@ var WsTunnel = class {
|
|
|
3700
3709
|
getStdioBridgeTarget() {
|
|
3701
3710
|
return this._options.stdioClient?.providerName ?? null;
|
|
3702
3711
|
}
|
|
3712
|
+
/**
|
|
3713
|
+
* Membership of the `_all` aggregate, for `broker_diagnose`.
|
|
3714
|
+
*
|
|
3715
|
+
* Before `start()` the aggregate server does not exist yet, so an enabled
|
|
3716
|
+
* aggregate reports no provider rather than `undefined`: "cannot be read"
|
|
3717
|
+
* is for a host that has no aggregate at all, not for one that has not
|
|
3718
|
+
* started. Without this accessor the CLI's own broker skipped the
|
|
3719
|
+
* `aggregate-empty` check and told the operator to call tools/list on
|
|
3720
|
+
* `_all` by hand.
|
|
3721
|
+
*/
|
|
3722
|
+
getAggregateInfo() {
|
|
3723
|
+
return {
|
|
3724
|
+
enabled: this._options.enableAggregateProvider !== false,
|
|
3725
|
+
providers: this._aggregateServer?.providerNames ?? []
|
|
3726
|
+
};
|
|
3727
|
+
}
|
|
3703
3728
|
getProvidersInfo() {
|
|
3704
3729
|
const out = [];
|
|
3705
3730
|
for (const [name, state] of this._providers) {
|
|
@@ -5951,5 +5976,5 @@ function resolveOpenTarget(raw, baseUrl) {
|
|
|
5951
5976
|
}
|
|
5952
5977
|
|
|
5953
5978
|
export { AuthError, BROKER_AGGREGATE_NAME, BROKER_GUIDES, BROKER_GUIDE_MIME_TYPE, BROKER_GUIDE_TOPICS, BROKER_GUIDE_URI_PREFIX, BROKER_GUIDE_URI_TEMPLATE, BROKER_PROVIDER_NAME, BROKER_RESERVED_SLOTS, BrokerDiagnoseAdapter, BrokerDiagnoseBehavior, BrokerGuideAdapter, BrokerGuideBehavior, BrokerInfoBehavior, BrokerProvidersBehavior, ConfigPolicyEngine, ConfiguredCapabilityClassifier, DEFAULT_CONFIG_FILENAME, DefaultSlotResourceResolver, HttpAuthGuard, JwtSubjectMapper, JwtTokenValidator, PACKAGE_NAME, RemoteUpstream, ResourcePath, ResourcePathPattern, SharedSecretProviderAuthenticator, StdioUpstream, SubjectMappingError, VERSION, WsTunnel, WsTunnelBuilder, authorizationWithEngine, brokerGrammarKey, brokerGuide, brokerGuideIndex, brokerGuideTopicFromUri, brokerGuideUri, buildJwtAuth, buildResourceMetadata, compileAuthorizationPolicy, compileProviderAllowedResources, diagnoseBroker, hasAuthorizationPolicies, isReservedBrokerSlot, iterAvailableBrokerGrammars, iterBrokerGrammarsFrom, loadBrokerConfig, loadBrokerGrammar, loadMcpbBundle, normalizeProviderAuthentication, providerMayPublish, providerPublishDecision, resolveOpenTarget, scopesOf, startBrokerServer, unzipMcpb, validateCapability };
|
|
5954
|
-
//# sourceMappingURL=chunk-
|
|
5955
|
-
//# sourceMappingURL=chunk-
|
|
5979
|
+
//# sourceMappingURL=chunk-UOJRDF5R.js.map
|
|
5980
|
+
//# sourceMappingURL=chunk-UOJRDF5R.js.map
|