@cyanmycelium/mcp-broker 0.4.0 → 1.2.0

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.
Files changed (151) hide show
  1. package/.mcp-broker.example/CONFIGURATION-EN.md +861 -0
  2. package/.mcp-broker.example/CONFIGURATION-FR.md +871 -0
  3. package/.mcp-broker.example/README.md +8 -3
  4. package/.mcp-broker.example/config.json +86 -0
  5. package/README.md +122 -3
  6. package/dist/bin.d.ts +0 -1
  7. package/dist/bin.js +180 -208
  8. package/dist/bin.js.map +1 -1
  9. package/dist/chunk-FTDKH2C4.js +3670 -0
  10. package/dist/chunk-FTDKH2C4.js.map +1 -0
  11. package/dist/{broker/grammars → grammars}/claude/en.json +1 -1
  12. package/dist/{broker/grammars → grammars}/claude/fr.json +1 -1
  13. package/dist/index.d.ts +1790 -18
  14. package/dist/index.js +2 -14
  15. package/dist/index.js.map +1 -1
  16. package/package.json +14 -8
  17. package/scripts/copy-assets.mjs +16 -10
  18. package/scripts/gen-cert.mjs +5 -5
  19. package/scripts/pack-mcpb.mjs +5 -5
  20. package/scripts/sign-bundle.mjs +6 -6
  21. package/src/auth/auth.config.ts +98 -0
  22. package/src/auth/auth.types.ts +120 -0
  23. package/src/auth/http.auth.ts +128 -0
  24. package/src/auth/index.ts +34 -0
  25. package/src/auth/jwt.validator.ts +63 -0
  26. package/src/auth/provider.auth.ts +114 -0
  27. package/src/auth/resource.metadata.ts +34 -0
  28. package/src/authorization/audit.ts +35 -0
  29. package/src/authorization/capability.classifier.ts +114 -0
  30. package/src/authorization/index.ts +37 -0
  31. package/src/authorization/policy.engine.ts +212 -0
  32. package/src/authorization/policy.types.ts +105 -0
  33. package/src/authorization/resource.path.ts +126 -0
  34. package/src/authorization/runtime.ts +56 -0
  35. package/src/authorization/slot.resource.ts +50 -0
  36. package/src/authorization/subject.mapper.ts +81 -0
  37. package/src/bin.ts +90 -7
  38. package/src/broker/adapters/broker.adapter.info.ts +3 -3
  39. package/src/broker/adapters/broker.adapter.providers.ts +3 -3
  40. package/src/broker/aggregate/aggregate.catalog.ts +49 -21
  41. package/src/broker/aggregate/aggregate.server.ts +149 -19
  42. package/src/broker/aggregate/provider.client.session.ts +22 -22
  43. package/src/broker/behaviors/broker.behavior.info.ts +4 -4
  44. package/src/broker/behaviors/broker.behavior.providers.ts +6 -6
  45. package/src/broker/broker.context.ts +10 -4
  46. package/src/broker/broker.grammars.ts +16 -13
  47. package/src/broker/broker.server.ts +12 -9
  48. package/src/broker/grammars/claude/en.json +1 -1
  49. package/src/broker/grammars/claude/fr.json +1 -1
  50. package/src/broker/index.ts +9 -9
  51. package/src/config.ts +81 -8
  52. package/src/index.ts +121 -20
  53. package/src/{mcpb.loader.ts → mcpb/mcpb.loader.ts} +24 -21
  54. package/src/{mcpb.unzip.ts → mcpb/mcpb.unzip.ts} +2 -2
  55. package/src/remote.transports.ts +11 -8
  56. package/src/remote.upstream.ts +11 -8
  57. package/src/stdio.upstream.ts +9 -6
  58. package/src/upstream.ts +6 -3
  59. package/src/ws/ws.interfaces.ts +357 -0
  60. package/src/{ws.tunnel.builder.ts → ws/ws.tunnel.builder.ts} +112 -9
  61. package/src/{ws.tunnel.ts → ws/ws.tunnel.ts} +646 -457
  62. package/web/README.md +94 -0
  63. package/web/assets/logo.png +0 -0
  64. package/web/broker-self-mcp.html +338 -0
  65. package/web/css/styles.css +580 -0
  66. package/web/demos/DemoPlaceholder.html +258 -0
  67. package/web/demos/broker-explorer/css/app.css +393 -0
  68. package/web/demos/broker-explorer/index.html +94 -0
  69. package/web/demos/broker-explorer/js/app.js +271 -0
  70. package/web/demos/broker-explorer/js/mcp-ws-client.js +132 -0
  71. package/web/demos/oauth-lab/README.md +94 -0
  72. package/web/demos/oauth-lab/config.json +117 -0
  73. package/web/demos/oauth-lab/css/app.css +1097 -0
  74. package/web/demos/oauth-lab/index.html +323 -0
  75. package/web/demos/oauth-lab/js/app.js +654 -0
  76. package/web/demos/oauth-lab/server/auth-server.mjs +426 -0
  77. package/web/demos/oauth-lab/server/factory-provider.mjs +269 -0
  78. package/web/demos/oauth-lab/server/smoke-test.mjs +308 -0
  79. package/web/demos/oauth-lab/server/start.mjs +106 -0
  80. package/web/demos/provider-tunnel/css/app.css +384 -0
  81. package/web/demos/provider-tunnel/index.html +99 -0
  82. package/web/demos/provider-tunnel/js/app.js +226 -0
  83. package/web/demos/provider-tunnel/js/toolbox-server.js +186 -0
  84. package/web/index.html +558 -0
  85. package/web/js/lib/broker-tunnel.js +173 -0
  86. package/dist/broker/adapters/broker.adapter.info.d.ts +0 -16
  87. package/dist/broker/adapters/broker.adapter.info.js +0 -43
  88. package/dist/broker/adapters/broker.adapter.info.js.map +0 -1
  89. package/dist/broker/adapters/broker.adapter.providers.d.ts +0 -18
  90. package/dist/broker/adapters/broker.adapter.providers.js +0 -61
  91. package/dist/broker/adapters/broker.adapter.providers.js.map +0 -1
  92. package/dist/broker/aggregate/aggregate.catalog.d.ts +0 -54
  93. package/dist/broker/aggregate/aggregate.catalog.js +0 -105
  94. package/dist/broker/aggregate/aggregate.catalog.js.map +0 -1
  95. package/dist/broker/aggregate/aggregate.server.d.ts +0 -47
  96. package/dist/broker/aggregate/aggregate.server.js +0 -151
  97. package/dist/broker/aggregate/aggregate.server.js.map +0 -1
  98. package/dist/broker/aggregate/provider.client.session.d.ts +0 -52
  99. package/dist/broker/aggregate/provider.client.session.js +0 -140
  100. package/dist/broker/aggregate/provider.client.session.js.map +0 -1
  101. package/dist/broker/behaviors/broker.behavior.info.d.ts +0 -15
  102. package/dist/broker/behaviors/broker.behavior.info.js +0 -41
  103. package/dist/broker/behaviors/broker.behavior.info.js.map +0 -1
  104. package/dist/broker/behaviors/broker.behavior.providers.d.ts +0 -19
  105. package/dist/broker/behaviors/broker.behavior.providers.js +0 -69
  106. package/dist/broker/behaviors/broker.behavior.providers.js.map +0 -1
  107. package/dist/broker/broker.context.d.ts +0 -59
  108. package/dist/broker/broker.context.js +0 -2
  109. package/dist/broker/broker.context.js.map +0 -1
  110. package/dist/broker/broker.grammars.d.ts +0 -130
  111. package/dist/broker/broker.grammars.js +0 -229
  112. package/dist/broker/broker.grammars.js.map +0 -1
  113. package/dist/broker/broker.server.d.ts +0 -66
  114. package/dist/broker/broker.server.js +0 -73
  115. package/dist/broker/broker.server.js.map +0 -1
  116. package/dist/broker/index.d.ts +0 -9
  117. package/dist/broker/index.js +0 -7
  118. package/dist/broker/index.js.map +0 -1
  119. package/dist/config.d.ts +0 -136
  120. package/dist/config.js +0 -61
  121. package/dist/config.js.map +0 -1
  122. package/dist/mcpb.loader.d.ts +0 -24
  123. package/dist/mcpb.loader.js +0 -161
  124. package/dist/mcpb.loader.js.map +0 -1
  125. package/dist/mcpb.unzip.d.ts +0 -6
  126. package/dist/mcpb.unzip.js +0 -95
  127. package/dist/mcpb.unzip.js.map +0 -1
  128. package/dist/remote.transports.d.ts +0 -16
  129. package/dist/remote.transports.js +0 -297
  130. package/dist/remote.transports.js.map +0 -1
  131. package/dist/remote.upstream.d.ts +0 -36
  132. package/dist/remote.upstream.js +0 -52
  133. package/dist/remote.upstream.js.map +0 -1
  134. package/dist/stdio.upstream.d.ts +0 -45
  135. package/dist/stdio.upstream.js +0 -85
  136. package/dist/stdio.upstream.js.map +0 -1
  137. package/dist/upstream.d.ts +0 -33
  138. package/dist/upstream.js +0 -2
  139. package/dist/upstream.js.map +0 -1
  140. package/dist/version.d.ts +0 -2
  141. package/dist/version.js +0 -9
  142. package/dist/version.js.map +0 -1
  143. package/dist/ws.tunnel.builder.d.ts +0 -139
  144. package/dist/ws.tunnel.builder.js +0 -205
  145. package/dist/ws.tunnel.builder.js.map +0 -1
  146. package/dist/ws.tunnel.d.ts +0 -373
  147. package/dist/ws.tunnel.js +0 -1090
  148. package/dist/ws.tunnel.js.map +0 -1
  149. /package/dist/{broker/grammars → grammars}/default/en.json +0 -0
  150. /package/dist/{broker/grammars → grammars}/default/fr.json +0 -0
  151. /package/dist/{broker/grammars → grammars}/default/zh.json +0 -0
@@ -1,139 +0,0 @@
1
- import { WsTunnel } from "./ws.tunnel.js";
2
- import type { StdioUpstreamConfig } from "./stdio.upstream.js";
3
- import type { RemoteUpstreamConfig } from "./remote.upstream.js";
4
- /**
5
- * Fluent builder that constructs a configured {@link WsTunnel}.
6
- *
7
- * @example
8
- * ```typescript
9
- * const tunnel = new WsTunnelBuilder()
10
- * .withPort(3000)
11
- * .withHost("localhost")
12
- * .withStaticMount("/", "/abs/path/to/www")
13
- * .build();
14
- *
15
- * await tunnel.start();
16
- * console.log("Broker listening on ws://localhost:3000");
17
- * console.log(" Provider connects to: ws://localhost:3000/provider/<name>");
18
- * console.log(" Clients connect to: ws://localhost:3000/<name>");
19
- * ```
20
- */
21
- export declare class WsTunnelBuilder {
22
- private _port;
23
- private _host;
24
- private _providerPath;
25
- private _providersPath;
26
- private _clientPath;
27
- private _ssePath;
28
- private _messagesPath;
29
- private _mcpPath;
30
- private _samplesIndexPath;
31
- private _staticMounts;
32
- private _stdioUpstreams;
33
- private _remoteUpstreams;
34
- private _stdioClient;
35
- private _tls;
36
- private _brokerLocalGrammarsDir;
37
- /** Sets the TCP port the broker listens on. */
38
- withPort(port: number): this;
39
- /**
40
- * Sets the host/interface to bind to.
41
- * @default "0.0.0.0" (all interfaces)
42
- */
43
- withHost(host: string): this;
44
- /**
45
- * Sets the URL path the MCP provider connects to.
46
- * @default "/provider"
47
- */
48
- withProviderPath(path: string): this;
49
- /**
50
- * Sets the URL path for multiplexed provider connections.
51
- * Multiple providers share a single WebSocket using the envelope protocol.
52
- * @default "/providers"
53
- */
54
- withProvidersPath(path: string): this;
55
- /**
56
- * Sets the URL path MCP clients connect to.
57
- * @default "/"
58
- */
59
- withClientPath(path: string): this;
60
- /**
61
- * Sets the URL path for the SSE stream (legacy Claude transport, GET).
62
- * @default "/sse"
63
- */
64
- withSsePath(path: string): this;
65
- /**
66
- * Sets the URL path for JSON-RPC POST requests (legacy Claude transport).
67
- * @default "/messages"
68
- */
69
- withMessagesPath(path: string): this;
70
- /**
71
- * Sets the URL path for the Streamable HTTP transport (MCP 2025-03-26).
72
- * MCP Inspector and other 2025+ clients POST JSON-RPC here.
73
- * @default "/mcp"
74
- */
75
- withMcpPath(path: string): this;
76
- /**
77
- * Sets the URL path that returns a `{ files: string[] }` listing of the
78
- * `samples/` subdirectory under the root static mount.
79
- * @default "/__samples_index__"
80
- */
81
- withSamplesIndexPath(path: string): this;
82
- /**
83
- * Adds a static-file mount served over plain HTTP.
84
- * Can be called multiple times; longest-prefix match wins at runtime.
85
- *
86
- * @param urlPrefix URL prefix that triggers this mount (e.g. `"/"` or `"/bundle"`).
87
- * @param dir Absolute path to the directory to serve.
88
- */
89
- withStaticMount(urlPrefix: string, dir: string): this;
90
- /**
91
- * Registers a stdio upstream provider. The broker spawns the configured
92
- * command and bridges its stdin/stdout as an MCP transport. Clients reach
93
- * it using `config.name` directly (e.g. `/<name>/mcp`).
94
- *
95
- * Can be called multiple times to register multiple providers.
96
- */
97
- withStdioUpstream(config: StdioUpstreamConfig): this;
98
- /**
99
- * Registers a remote MCP server reached by URL. The broker connects out to
100
- * it and exposes it as a provider slot named `config.name`, bridging the
101
- * Streamable HTTP / SSE / WebSocket transport for the slot's clients.
102
- *
103
- * Can be called multiple times to register multiple servers.
104
- */
105
- withRemoteUpstream(config: RemoteUpstreamConfig): this;
106
- /**
107
- * Enables the stdio client transport. The broker will read JSON-RPC from
108
- * `process.stdin` and write responses to `process.stdout`, bridging Claude
109
- * Desktop (or any stdio MCP client) to the named provider.
110
- *
111
- * All console output is automatically redirected to stderr in this mode so
112
- * stdout stays clean for the JSON-RPC stream.
113
- *
114
- * @param providerName The provider the stdio client maps to.
115
- */
116
- withStdioClient(providerName: string): this;
117
- /**
118
- * Enables HTTPS/WSS mode by supplying PEM-encoded certificate and key strings directly.
119
- * Call this when you already have the PEM content in memory.
120
- */
121
- withTls(cert: string, key: string): this;
122
- /**
123
- * Enables HTTPS/WSS mode by reading the certificate and key from the given file paths.
124
- * Files are read synchronously at call time.
125
- *
126
- * @param certPath Path to the PEM certificate file (e.g. `fullchain.pem`).
127
- * @param keyPath Path to the PEM private-key file (e.g. `privkey.pem`).
128
- */
129
- withTlsFiles(certPath: string, keyPath: string): this;
130
- /**
131
- * Sets the path to a user-supplied grammars directory whose
132
- * `<userAgent>/<locale>.json` files are merged on top of the packaged
133
- * grammars used by the embedded broker server (the reserved `_broker`
134
- * provider slot). Typically pointed at `.mcp-broker/grammars/`.
135
- */
136
- withBrokerLocalGrammarsDir(dir: string): this;
137
- /** Constructs and returns a configured {@link WsTunnel}. */
138
- build(): WsTunnel;
139
- }
@@ -1,205 +0,0 @@
1
- import * as fs from "fs";
2
- import { WsTunnel } from "./ws.tunnel.js";
3
- /**
4
- * Fluent builder that constructs a configured {@link WsTunnel}.
5
- *
6
- * @example
7
- * ```typescript
8
- * const tunnel = new WsTunnelBuilder()
9
- * .withPort(3000)
10
- * .withHost("localhost")
11
- * .withStaticMount("/", "/abs/path/to/www")
12
- * .build();
13
- *
14
- * await tunnel.start();
15
- * console.log("Broker listening on ws://localhost:3000");
16
- * console.log(" Provider connects to: ws://localhost:3000/provider/<name>");
17
- * console.log(" Clients connect to: ws://localhost:3000/<name>");
18
- * ```
19
- */
20
- export class WsTunnelBuilder {
21
- _port = 3000;
22
- _host;
23
- _providerPath = "/provider";
24
- _providersPath = "/providers";
25
- _clientPath = "/";
26
- _ssePath = "/sse";
27
- _messagesPath = "/messages";
28
- _mcpPath = "/mcp";
29
- _samplesIndexPath = "/__samples_index__";
30
- _staticMounts = [];
31
- _stdioUpstreams = [];
32
- _remoteUpstreams = [];
33
- _stdioClient = undefined;
34
- _tls = undefined;
35
- _brokerLocalGrammarsDir = undefined;
36
- /** Sets the TCP port the broker listens on. */
37
- withPort(port) {
38
- this._port = port;
39
- return this;
40
- }
41
- /**
42
- * Sets the host/interface to bind to.
43
- * @default "0.0.0.0" (all interfaces)
44
- */
45
- withHost(host) {
46
- this._host = host;
47
- return this;
48
- }
49
- /**
50
- * Sets the URL path the MCP provider connects to.
51
- * @default "/provider"
52
- */
53
- withProviderPath(path) {
54
- this._providerPath = path;
55
- return this;
56
- }
57
- /**
58
- * Sets the URL path for multiplexed provider connections.
59
- * Multiple providers share a single WebSocket using the envelope protocol.
60
- * @default "/providers"
61
- */
62
- withProvidersPath(path) {
63
- this._providersPath = path;
64
- return this;
65
- }
66
- /**
67
- * Sets the URL path MCP clients connect to.
68
- * @default "/"
69
- */
70
- withClientPath(path) {
71
- this._clientPath = path;
72
- return this;
73
- }
74
- /**
75
- * Sets the URL path for the SSE stream (legacy Claude transport, GET).
76
- * @default "/sse"
77
- */
78
- withSsePath(path) {
79
- this._ssePath = path;
80
- return this;
81
- }
82
- /**
83
- * Sets the URL path for JSON-RPC POST requests (legacy Claude transport).
84
- * @default "/messages"
85
- */
86
- withMessagesPath(path) {
87
- this._messagesPath = path;
88
- return this;
89
- }
90
- /**
91
- * Sets the URL path for the Streamable HTTP transport (MCP 2025-03-26).
92
- * MCP Inspector and other 2025+ clients POST JSON-RPC here.
93
- * @default "/mcp"
94
- */
95
- withMcpPath(path) {
96
- this._mcpPath = path;
97
- return this;
98
- }
99
- /**
100
- * Sets the URL path that returns a `{ files: string[] }` listing of the
101
- * `samples/` subdirectory under the root static mount.
102
- * @default "/__samples_index__"
103
- */
104
- withSamplesIndexPath(path) {
105
- this._samplesIndexPath = path;
106
- return this;
107
- }
108
- /**
109
- * Adds a static-file mount served over plain HTTP.
110
- * Can be called multiple times; longest-prefix match wins at runtime.
111
- *
112
- * @param urlPrefix URL prefix that triggers this mount (e.g. `"/"` or `"/bundle"`).
113
- * @param dir Absolute path to the directory to serve.
114
- */
115
- withStaticMount(urlPrefix, dir) {
116
- this._staticMounts.push({ urlPrefix, dir });
117
- return this;
118
- }
119
- /**
120
- * Registers a stdio upstream provider. The broker spawns the configured
121
- * command and bridges its stdin/stdout as an MCP transport. Clients reach
122
- * it using `config.name` directly (e.g. `/<name>/mcp`).
123
- *
124
- * Can be called multiple times to register multiple providers.
125
- */
126
- withStdioUpstream(config) {
127
- this._stdioUpstreams.push(config);
128
- return this;
129
- }
130
- /**
131
- * Registers a remote MCP server reached by URL. The broker connects out to
132
- * it and exposes it as a provider slot named `config.name`, bridging the
133
- * Streamable HTTP / SSE / WebSocket transport for the slot's clients.
134
- *
135
- * Can be called multiple times to register multiple servers.
136
- */
137
- withRemoteUpstream(config) {
138
- this._remoteUpstreams.push(config);
139
- return this;
140
- }
141
- /**
142
- * Enables the stdio client transport. The broker will read JSON-RPC from
143
- * `process.stdin` and write responses to `process.stdout`, bridging Claude
144
- * Desktop (or any stdio MCP client) to the named provider.
145
- *
146
- * All console output is automatically redirected to stderr in this mode so
147
- * stdout stays clean for the JSON-RPC stream.
148
- *
149
- * @param providerName The provider the stdio client maps to.
150
- */
151
- withStdioClient(providerName) {
152
- this._stdioClient = { providerName };
153
- return this;
154
- }
155
- /**
156
- * Enables HTTPS/WSS mode by supplying PEM-encoded certificate and key strings directly.
157
- * Call this when you already have the PEM content in memory.
158
- */
159
- withTls(cert, key) {
160
- this._tls = { cert, key };
161
- return this;
162
- }
163
- /**
164
- * Enables HTTPS/WSS mode by reading the certificate and key from the given file paths.
165
- * Files are read synchronously at call time.
166
- *
167
- * @param certPath Path to the PEM certificate file (e.g. `fullchain.pem`).
168
- * @param keyPath Path to the PEM private-key file (e.g. `privkey.pem`).
169
- */
170
- withTlsFiles(certPath, keyPath) {
171
- return this.withTls(fs.readFileSync(certPath, "utf8"), fs.readFileSync(keyPath, "utf8"));
172
- }
173
- /**
174
- * Sets the path to a user-supplied grammars directory whose
175
- * `<userAgent>/<locale>.json` files are merged on top of the packaged
176
- * grammars used by the embedded broker server (the reserved `_broker`
177
- * provider slot). Typically pointed at `.mcp-broker/grammars/`.
178
- */
179
- withBrokerLocalGrammarsDir(dir) {
180
- this._brokerLocalGrammarsDir = dir;
181
- return this;
182
- }
183
- /** Constructs and returns a configured {@link WsTunnel}. */
184
- build() {
185
- const options = {
186
- port: this._port,
187
- host: this._host,
188
- providerPath: this._providerPath,
189
- providersPath: this._providersPath,
190
- clientPath: this._clientPath,
191
- ssePath: this._ssePath,
192
- messagesPath: this._messagesPath,
193
- mcpPath: this._mcpPath,
194
- samplesIndexPath: this._samplesIndexPath,
195
- staticMounts: this._staticMounts.length > 0 ? [...this._staticMounts] : undefined,
196
- stdioUpstreams: this._stdioUpstreams.length > 0 ? [...this._stdioUpstreams] : undefined,
197
- remoteUpstreams: this._remoteUpstreams.length > 0 ? [...this._remoteUpstreams] : undefined,
198
- stdioClient: this._stdioClient,
199
- tls: this._tls,
200
- brokerLocalGrammarsDir: this._brokerLocalGrammarsDir,
201
- };
202
- return new WsTunnel(options);
203
- }
204
- }
205
- //# sourceMappingURL=ws.tunnel.builder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ws.tunnel.builder.js","sourceRoot":"","sources":["../src/ws.tunnel.builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,QAAQ,EAA0C,MAAM,gBAAgB,CAAC;AAIlF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,eAAe;IAChB,KAAK,GAAG,IAAI,CAAC;IACb,KAAK,CAAqB;IAC1B,aAAa,GAAG,WAAW,CAAC;IAC5B,cAAc,GAAG,YAAY,CAAC;IAC9B,WAAW,GAAG,GAAG,CAAC;IAClB,QAAQ,GAAG,MAAM,CAAC;IAClB,aAAa,GAAG,WAAW,CAAC;IAC5B,QAAQ,GAAG,MAAM,CAAC;IAClB,iBAAiB,GAAG,oBAAoB,CAAC;IACzC,aAAa,GAAkB,EAAE,CAAC;IAClC,eAAe,GAA0B,EAAE,CAAC;IAC5C,gBAAgB,GAA2B,EAAE,CAAC;IAC9C,YAAY,GAAyC,SAAS,CAAC;IAC/D,IAAI,GAA8C,SAAS,CAAC;IAC5D,uBAAuB,GAAuB,SAAS,CAAC;IAEhE,+CAA+C;IAC/C,QAAQ,CA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