@1mcp/agent 0.39.0-beta.0 → 0.39.0-beta.2
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/build/admin/assets/{admin-OAuthServicesWorkspace-Bmets2jv.js → admin-OAuthServicesWorkspace-CKPMmDQI.js} +1 -1
- package/build/admin/assets/{admin-console-DyzxXXr5.js → admin-console-CwgYre_s.js} +3 -3
- package/build/admin/index.html +1 -1
- package/build/commands/inspect/index.d.ts.map +1 -1
- package/build/commands/inspect/index.js +21 -2
- package/build/commands/inspect/index.js.map +1 -1
- package/build/commands/inspect/inspect.d.ts +5 -0
- package/build/commands/inspect/inspect.d.ts.map +1 -1
- package/build/commands/inspect/inspect.js +120 -5
- package/build/commands/inspect/inspect.js.map +1 -1
- package/build/commands/inspect/inspectUtils.d.ts +2 -1
- package/build/commands/inspect/inspectUtils.d.ts.map +1 -1
- package/build/commands/inspect/inspectUtils.js +21 -0
- package/build/commands/inspect/inspectUtils.js.map +1 -1
- package/build/commands/instructions/instructionsUtils.d.ts.map +1 -1
- package/build/commands/instructions/instructionsUtils.js +5 -2
- package/build/commands/instructions/instructionsUtils.js.map +1 -1
- package/build/commands/serve/cooperativeRuntime.d.ts +5 -1
- package/build/commands/serve/cooperativeRuntime.d.ts.map +1 -1
- package/build/commands/serve/cooperativeRuntime.js +91 -20
- package/build/commands/serve/cooperativeRuntime.js.map +1 -1
- package/build/commands/serve/index.d.ts +6 -0
- package/build/commands/serve/index.d.ts.map +1 -1
- package/build/commands/serve/index.js +7 -1
- package/build/commands/serve/index.js.map +1 -1
- package/build/commands/serve/serveStop.d.ts.map +1 -1
- package/build/commands/serve/serveStop.js +41 -5
- package/build/commands/serve/serveStop.js.map +1 -1
- package/build/commands/shared/inspectApiSchemas.d.ts +25 -0
- package/build/commands/shared/inspectApiSchemas.d.ts.map +1 -1
- package/build/commands/shared/inspectApiSchemas.js +21 -0
- package/build/commands/shared/inspectApiSchemas.js.map +1 -1
- package/build/constants/mcp.d.ts +1 -1
- package/build/constants/mcp.js +1 -1
- package/build/core/capabilities/capabilityCatalog.d.ts +3 -1
- package/build/core/capabilities/capabilityCatalog.d.ts.map +1 -1
- package/build/core/capabilities/capabilityCatalog.js +8 -8
- package/build/core/capabilities/capabilityCatalog.js.map +1 -1
- package/build/core/capabilities/capabilityManager.js +1 -1
- package/build/core/capabilities/capabilityManager.js.map +1 -1
- package/build/core/capabilities/inspectSearch.d.ts +45 -0
- package/build/core/capabilities/inspectSearch.d.ts.map +1 -0
- package/build/core/capabilities/inspectSearch.js +102 -0
- package/build/core/capabilities/inspectSearch.js.map +1 -0
- package/build/core/capabilities/lazyLoadingOrchestrator.d.ts +17 -2
- package/build/core/capabilities/lazyLoadingOrchestrator.d.ts.map +1 -1
- package/build/core/capabilities/lazyLoadingOrchestrator.js +53 -5
- package/build/core/capabilities/lazyLoadingOrchestrator.js.map +1 -1
- package/build/core/capabilities/metaToolProvider.d.ts +2 -2
- package/build/core/capabilities/metaToolProvider.d.ts.map +1 -1
- package/build/core/capabilities/metaToolProvider.js +11 -10
- package/build/core/capabilities/metaToolProvider.js.map +1 -1
- package/build/core/capabilities/runtimeCapabilityCatalog.d.ts +2 -0
- package/build/core/capabilities/runtimeCapabilityCatalog.d.ts.map +1 -1
- package/build/core/capabilities/runtimeCapabilityCatalog.js +19 -2
- package/build/core/capabilities/runtimeCapabilityCatalog.js.map +1 -1
- package/build/core/capabilities/toolRegistry.d.ts +3 -0
- package/build/core/capabilities/toolRegistry.d.ts.map +1 -1
- package/build/core/capabilities/toolRegistry.js +4 -0
- package/build/core/capabilities/toolRegistry.js.map +1 -1
- package/build/core/instructions/instructionsDistribution.d.ts.map +1 -1
- package/build/core/instructions/instructionsDistribution.js +5 -2
- package/build/core/instructions/instructionsDistribution.js.map +1 -1
- package/build/core/instructions/templateTypes.d.ts +1 -1
- package/build/core/instructions/templateTypes.d.ts.map +1 -1
- package/build/core/instructions/templateTypes.js +5 -2
- package/build/core/instructions/templateTypes.js.map +1 -1
- package/build/core/notifications/notificationManager.d.ts.map +1 -1
- package/build/core/notifications/notificationManager.js +1 -1
- package/build/core/notifications/notificationManager.js.map +1 -1
- package/build/core/server/runtimeControl.d.ts +6 -0
- package/build/core/server/runtimeControl.d.ts.map +1 -1
- package/build/core/server/runtimeControl.js +26 -1
- package/build/core/server/runtimeControl.js.map +1 -1
- package/build/core/server/runtimeReplacementConfig.d.ts.map +1 -1
- package/build/core/server/runtimeReplacementConfig.js +1 -0
- package/build/core/server/runtimeReplacementConfig.js.map +1 -1
- package/build/core/server/runtimeScopeOwnership.d.ts +3 -1
- package/build/core/server/runtimeScopeOwnership.d.ts.map +1 -1
- package/build/core/server/runtimeScopeOwnership.js +1 -1
- package/build/core/server/runtimeScopeOwnership.js.map +1 -1
- package/build/core/server/staleCooperativeRuntime.d.ts +13 -0
- package/build/core/server/staleCooperativeRuntime.d.ts.map +1 -0
- package/build/core/server/staleCooperativeRuntime.js +91 -0
- package/build/core/server/staleCooperativeRuntime.js.map +1 -0
- package/build/core/types/server.d.ts +6 -1
- package/build/core/types/server.d.ts.map +1 -1
- package/build/core/validation/schemaBoundary.d.ts +10 -1
- package/build/core/validation/schemaBoundary.d.ts.map +1 -1
- package/build/core/validation/schemaBoundary.js +24 -2
- package/build/core/validation/schemaBoundary.js.map +1 -1
- package/build/core/validation/schemaWorker.js +5 -1
- package/build/core/validation/schemaWorker.js.map +1 -1
- package/build/gateway/interactions/interactionRoute.d.ts.map +1 -1
- package/build/gateway/interactions/interactionRoute.js +5 -1
- package/build/gateway/interactions/interactionRoute.js.map +1 -1
- package/build/sdk/legacy/client/runtime/modernSdkClientAdapter.d.ts +7 -0
- package/build/sdk/legacy/client/runtime/modernSdkClientAdapter.d.ts.map +1 -1
- package/build/sdk/legacy/client/runtime/modernSdkClientAdapter.js +141 -0
- package/build/sdk/legacy/client/runtime/modernSdkClientAdapter.js.map +1 -1
- package/build/sdk/legacy/client/runtime/modernSubscriptions.d.ts +43 -0
- package/build/sdk/legacy/client/runtime/modernSubscriptions.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/modernSubscriptions.js +186 -0
- package/build/sdk/legacy/client/runtime/modernSubscriptions.js.map +1 -0
- package/build/sdk/legacy/commands/serve.d.ts +1 -0
- package/build/sdk/legacy/commands/serve.d.ts.map +1 -1
- package/build/sdk/legacy/commands/serve.js.map +1 -1
- package/build/sdk/legacy/server/auth/requestAuthRevalidation.d.ts +5 -0
- package/build/sdk/legacy/server/auth/requestAuthRevalidation.d.ts.map +1 -0
- package/build/sdk/legacy/server/auth/requestAuthRevalidation.js +19 -0
- package/build/sdk/legacy/server/auth/requestAuthRevalidation.js.map +1 -0
- package/build/sdk/legacy/server/protocol/notificationHandlers.d.ts +1 -1
- package/build/sdk/legacy/server/protocol/notificationHandlers.d.ts.map +1 -1
- package/build/sdk/legacy/server/protocol/notificationHandlers.js +36 -34
- package/build/sdk/legacy/server/protocol/notificationHandlers.js.map +1 -1
- package/build/sdk/legacy/server/protocol/promptRequestHandlers.d.ts.map +1 -1
- package/build/sdk/legacy/server/protocol/promptRequestHandlers.js +6 -1
- package/build/sdk/legacy/server/protocol/promptRequestHandlers.js.map +1 -1
- package/build/sdk/legacy/server/protocol/resourceRequestHandlers.d.ts.map +1 -1
- package/build/sdk/legacy/server/protocol/resourceRequestHandlers.js +15 -13
- package/build/sdk/legacy/server/protocol/resourceRequestHandlers.js.map +1 -1
- package/build/sdk/legacy/server/protocol/resourceSubscriptions.d.ts +27 -0
- package/build/sdk/legacy/server/protocol/resourceSubscriptions.d.ts.map +1 -0
- package/build/sdk/legacy/server/protocol/resourceSubscriptions.js +594 -0
- package/build/sdk/legacy/server/protocol/resourceSubscriptions.js.map +1 -0
- package/build/sdk/legacy/server/protocol/toolRequestHandlers.d.ts.map +1 -1
- package/build/sdk/legacy/server/protocol/toolRequestHandlers.js +15 -4
- package/build/sdk/legacy/server/protocol/toolRequestHandlers.js.map +1 -1
- package/build/sdk/legacy/server/runtime/connectionManager.d.ts.map +1 -1
- package/build/sdk/legacy/server/runtime/connectionManager.js +51 -5
- package/build/sdk/legacy/server/runtime/connectionManager.js.map +1 -1
- package/build/sdk/legacy/server/runtime/legacySdkServerAdapter.d.ts +12 -0
- package/build/sdk/legacy/server/runtime/legacySdkServerAdapter.d.ts.map +1 -1
- package/build/sdk/legacy/server/runtime/legacySdkServerAdapter.js +109 -10
- package/build/sdk/legacy/server/runtime/legacySdkServerAdapter.js.map +1 -1
- package/build/sdk/legacy/server/runtime/serverManager.d.ts.map +1 -1
- package/build/sdk/legacy/server/runtime/serverManager.js +4 -1
- package/build/sdk/legacy/server/runtime/serverManager.js.map +1 -1
- package/build/sdk/legacy/transport/http/middlewares/scopeAuthMiddleware.d.ts +2 -0
- package/build/sdk/legacy/transport/http/middlewares/scopeAuthMiddleware.d.ts.map +1 -1
- package/build/sdk/legacy/transport/http/middlewares/scopeAuthMiddleware.js +8 -14
- package/build/sdk/legacy/transport/http/middlewares/scopeAuthMiddleware.js.map +1 -1
- package/build/sdk/legacy/transport/http/modernInboundLegacyBridge.d.ts +9 -0
- package/build/sdk/legacy/transport/http/modernInboundLegacyBridge.d.ts.map +1 -1
- package/build/sdk/legacy/transport/http/modernInboundLegacyBridge.js +84 -6
- package/build/sdk/legacy/transport/http/modernInboundLegacyBridge.js.map +1 -1
- package/build/transport/http/routes/inspectRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/inspectRoutes.js +101 -0
- package/build/transport/http/routes/inspectRoutes.js.map +1 -1
- package/build/transport/http/routes/modernHttpRoutes.d.ts +11 -10
- package/build/transport/http/routes/modernHttpRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/modernHttpRoutes.js +26 -3
- package/build/transport/http/routes/modernHttpRoutes.js.map +1 -1
- package/build/transport/http/routes/modernSubscriptions.d.ts +21 -0
- package/build/transport/http/routes/modernSubscriptions.d.ts.map +1 -0
- package/build/transport/http/routes/modernSubscriptions.js +425 -0
- package/build/transport/http/routes/modernSubscriptions.js.map +1 -0
- package/package.json +3 -3
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { acquireRuntimeCapabilityCatalog } from '../../../../core/capabilities/runtimeCapabilityCatalog.js';
|
|
2
2
|
import { getRequestSession, resolveCapabilityVisibility } from '../../../../core/protocol/requestHandlerUtils.js';
|
|
3
3
|
import { requestLegacyOutbound, } from '../../client/runtime/legacyOutboundConnection.js';
|
|
4
|
+
import { revalidateLegacyRequestAuthInfo } from '../auth/requestAuthRevalidation.js';
|
|
4
5
|
import { getLegacyInboundServer } from '../runtime/legacyInboundConnection.js';
|
|
5
6
|
import { projectResourceUri, resolveResourceRoute } from '../../shared/resourceTemplateRouting.js';
|
|
6
7
|
import { ListResourcesRequestSchema, ListResourceTemplatesRequestSchema, ReadResourceRequestSchema, SubscribeRequestSchema, UnsubscribeRequestSchema, } from '../../types.js';
|
|
7
8
|
import { withErrorHandling } from '../../../../utils/core/errorHandling.js';
|
|
8
9
|
import { withPrivateInteractionConnection } from './privateInteractionConnection.js';
|
|
10
|
+
import { bindOwnedCatalogConnections, bindOwnedNotificationAuthorization, subscribeOwnedResource, unsubscribeOwnedResource, } from './resourceSubscriptions.js';
|
|
9
11
|
export function registerResourceHandlers(outboundConns, inboundConn) {
|
|
10
12
|
const acquire = (cursor, kind = 'resources') => acquireRuntimeCapabilityCatalog(outboundConns, resolveCapabilityVisibility(outboundConns, inboundConn, getRequestSession(inboundConn), 'resources'), { continuation: cursor ? { kind, cursor, enablePagination: inboundConn.enablePagination ?? false } : undefined });
|
|
11
13
|
const server = getLegacyInboundServer(inboundConn);
|
|
12
|
-
server.setRequestHandler(ListResourcesRequestSchema, withErrorHandling(async (request) => {
|
|
14
|
+
server.setRequestHandler(ListResourcesRequestSchema, withErrorHandling(async (request, extra) => {
|
|
15
|
+
bindOwnedCatalogConnections(outboundConns, inboundConn, 'resources');
|
|
16
|
+
if (extra?.authInfo)
|
|
17
|
+
bindOwnedNotificationAuthorization(outboundConns, inboundConn, () => revalidateLegacyRequestAuthInfo(extra.authInfo));
|
|
13
18
|
const snapshot = await acquire(request.params?.cursor);
|
|
14
19
|
const result = await snapshot.list('resources', {
|
|
15
20
|
cursor: request.params?.cursor,
|
|
@@ -21,7 +26,10 @@ export function registerResourceHandlers(outboundConns, inboundConn) {
|
|
|
21
26
|
...(result._meta === undefined ? {} : { _meta: result._meta }),
|
|
22
27
|
};
|
|
23
28
|
}, 'Error listing resources'));
|
|
24
|
-
server.setRequestHandler(ListResourceTemplatesRequestSchema, withErrorHandling(async (request) => {
|
|
29
|
+
server.setRequestHandler(ListResourceTemplatesRequestSchema, withErrorHandling(async (request, extra) => {
|
|
30
|
+
bindOwnedCatalogConnections(outboundConns, inboundConn, 'resources');
|
|
31
|
+
if (extra?.authInfo)
|
|
32
|
+
bindOwnedNotificationAuthorization(outboundConns, inboundConn, () => revalidateLegacyRequestAuthInfo(extra.authInfo));
|
|
25
33
|
const snapshot = await acquire(request.params?.cursor, 'resourceTemplates');
|
|
26
34
|
const result = await snapshot.list('resourceTemplates', {
|
|
27
35
|
cursor: request.params?.cursor,
|
|
@@ -33,19 +41,13 @@ export function registerResourceHandlers(outboundConns, inboundConn) {
|
|
|
33
41
|
...(result._meta === undefined ? {} : { _meta: result._meta }),
|
|
34
42
|
};
|
|
35
43
|
}, 'Error listing resource templates'));
|
|
36
|
-
server.setRequestHandler(SubscribeRequestSchema, withErrorHandling(async (request) => {
|
|
37
|
-
|
|
38
|
-
return
|
|
39
|
-
...request.params,
|
|
40
|
-
uri: route.upstreamIdentity,
|
|
41
|
-
});
|
|
44
|
+
server.setRequestHandler(SubscribeRequestSchema, withErrorHandling(async (request, extra) => {
|
|
45
|
+
await subscribeOwnedResource(outboundConns, inboundConn, request.params.uri, extra.signal, extra.authInfo ? () => revalidateLegacyRequestAuthInfo(extra.authInfo) : undefined);
|
|
46
|
+
return {};
|
|
42
47
|
}, 'Error subscribing to resource'));
|
|
43
48
|
server.setRequestHandler(UnsubscribeRequestSchema, withErrorHandling(async (request) => {
|
|
44
|
-
|
|
45
|
-
return
|
|
46
|
-
...request.params,
|
|
47
|
-
uri: route.upstreamIdentity,
|
|
48
|
-
});
|
|
49
|
+
await unsubscribeOwnedResource(inboundConn, request.params.uri);
|
|
50
|
+
return {};
|
|
49
51
|
}, 'Error unsubscribing from resource'));
|
|
50
52
|
server.setRequestHandler(ReadResourceRequestSchema, withErrorHandling(async (request, extra) => {
|
|
51
53
|
const snapshot = await acquire();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourceRequestHandlers.js","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/protocol/resourceRequestHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAE3G,OAAO,EAEL,qBAAqB,GACtB,MAAM,4DAA4D,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2DAA2D,CAAC;AACnG,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAC7G,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"resourceRequestHandlers.js","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/protocol/resourceRequestHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAE3G,OAAO,EAEL,qBAAqB,GACtB,MAAM,4DAA4D,CAAC;AACpE,OAAO,EAAE,+BAA+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AAM,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,MAAM,gCAAgC,CACnD,KAAK,CAAC,UAAU,EAChB,WAAW,EACX,KAAK,EACL,KAAK,CAAC,KAAK,EACX,CAAC,QAAQ,EAAE,EAAE,CACX,qBAAqB,CACnB,QAAQ,EACR,gBAAgB,EAChB,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,gBAAgB,EAAE,CACnD,CACJ,CAAC;QACF,OAAO;YACL,GAAG,MAAM;YACT,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;gBAC1C,GAAG,OAAO;gBACV,GAAG,EAAE,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC;aAChF,CAAC,CAAC;SACJ,CAAC;IACJ,CAAC,EAAE,wBAAwB,CAAC,CAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type InboundConnection } from '../../../../core/types/index.js';
|
|
2
|
+
import { type LegacyOutboundConnection, type LegacyOutboundConnections } from '../../client/runtime/legacyOutboundConnection.js';
|
|
3
|
+
interface Update {
|
|
4
|
+
method: string;
|
|
5
|
+
params?: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
export declare function setupOwnedResourceNotifications(connection: LegacyOutboundConnection): void;
|
|
8
|
+
export declare function cleanupOwnedResources(inbound: InboundConnection): Promise<void>;
|
|
9
|
+
/** Legacy inbound connections implicitly receive supported catalog changes; private modern bridges pin their filters. */
|
|
10
|
+
export declare function registerOwnedCatalogConnection(connections: LegacyOutboundConnections, inbound: InboundConnection, connection: LegacyOutboundConnection, kind: 'tools' | 'resources' | 'prompts'): void;
|
|
11
|
+
export declare function bindOwnedCatalogConnections(connections: LegacyOutboundConnections, inbound: InboundConnection, kind: 'tools' | 'resources' | 'prompts'): void;
|
|
12
|
+
/** HTTP sessions cannot send unsolicited data before their initializing request binds its grant. */
|
|
13
|
+
export declare function requireOwnedNotificationAuthorization(connections: LegacyOutboundConnections, inbound: InboundConnection): void;
|
|
14
|
+
/** Bind the admitted request grant before allowing unsolicited catalog delivery. */
|
|
15
|
+
export declare function bindOwnedNotificationAuthorization(connections: LegacyOutboundConnections, inbound: InboundConnection, authorize: () => Promise<boolean>): void;
|
|
16
|
+
/** Only the exact source/kind whose coverage belongs to this owner may enqueue a catalog event. */
|
|
17
|
+
export declare function enqueueOwnedCatalogNotification(connections: LegacyOutboundConnections, inbound: InboundConnection, connection: LegacyOutboundConnection, notification: Update): void;
|
|
18
|
+
/** Catalog invalidation remains synchronous upstream; recipient delivery never blocks its peers. */
|
|
19
|
+
export declare function enqueueOwnedNotification(connections: LegacyOutboundConnections, inbound: InboundConnection, notification: Update): void;
|
|
20
|
+
export declare function subscribeOwnedResource(connections: LegacyOutboundConnections, inbound: InboundConnection, uri: string, signal?: AbortSignal, authorize?: () => Promise<boolean>): Promise<void>;
|
|
21
|
+
export declare function unsubscribeOwnedResource(inbound: InboundConnection, uri: string): Promise<void>;
|
|
22
|
+
/** One upstream callback fans out without awaiting any recipient's delivery queue. */
|
|
23
|
+
export declare function deliverOwnedResourceUpdate(connection: LegacyOutboundConnection, notification: Update): void;
|
|
24
|
+
/** Coverage loss is terminal; streams are never silently reattached or replayed. */
|
|
25
|
+
export declare function loseOwnedResourceCoverage(connection: LegacyOutboundConnection, uri?: string): void;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=resourceSubscriptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceSubscriptions.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/protocol/resourceSubscriptions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,KAA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