poe-code 3.0.441-beta.1 → 3.0.441
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/tiny-http-mcp-server/LICENSE +21 -0
- package/packages/tiny-http-mcp-server/dist/cli.js +4 -15
- package/packages/tiny-http-mcp-server/dist/testing.d.ts +2 -2
- package/packages/tiny-http-mcp-server/dist/testing.js +11 -4
- package/packages/tiny-http-mcp-server/package.json +17 -14
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Poe Platform
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { realpathSync } from "node:fs";
|
|
3
3
|
import { parseArgs } from "node:util";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
import { createHttpServer } from "./http-server.js";
|
|
6
6
|
import { loadOAuthVerifier } from "./load-oauth-verifier.js";
|
|
7
|
+
import packageJson from "../package.json" with { type: "json" };
|
|
7
8
|
function readPackageInfo() {
|
|
8
|
-
try {
|
|
9
|
-
const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
10
|
-
if (typeof packageJson.name === "string" && typeof packageJson.version === "string") {
|
|
11
|
-
return {
|
|
12
|
-
name: packageJson.name,
|
|
13
|
-
version: packageJson.version
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
// Fall through to a stable default when package.json is unavailable.
|
|
19
|
-
}
|
|
20
9
|
return {
|
|
21
|
-
name:
|
|
22
|
-
version:
|
|
10
|
+
name: packageJson.name,
|
|
11
|
+
version: packageJson.version
|
|
23
12
|
};
|
|
24
13
|
}
|
|
25
14
|
const packageInfo = readPackageInfo();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
|
-
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
1
|
+
import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
|
+
import type { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
3
3
|
import type { HttpServer, HttpServerHandle } from "./http-server.js";
|
|
4
4
|
import { type TokenVerifier } from "./auth.js";
|
|
5
5
|
export { createTestMcpServer, nodeFetch } from "./test-support.js";
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
|
-
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
3
1
|
import { TokenVerificationError, } from "./auth.js";
|
|
4
2
|
import { nodeFetch } from "./test-support.js";
|
|
5
3
|
export { createTestMcpServer, nodeFetch } from "./test-support.js";
|
|
@@ -101,9 +99,18 @@ export function createInMemoryTokenVerifier(options = {}) {
|
|
|
101
99
|
};
|
|
102
100
|
}
|
|
103
101
|
export async function createHttpTestPair(server) {
|
|
102
|
+
let sdkClient;
|
|
103
|
+
let sdkTransport;
|
|
104
|
+
try {
|
|
105
|
+
sdkClient = await import("@modelcontextprotocol/sdk/client/index.js");
|
|
106
|
+
sdkTransport = await import("@modelcontextprotocol/sdk/client/streamableHttp.js");
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
throw new Error("createHttpTestPair requires @modelcontextprotocol/sdk; install it as a devDependency or use createHttpTestPairWithTinyClient", { cause: error });
|
|
110
|
+
}
|
|
104
111
|
const handle = await server.listenHttp({ port: 0 });
|
|
105
|
-
const client = new Client({ name: "sdk-test-client", version: "1.0.0" });
|
|
106
|
-
const transport = new StreamableHTTPClientTransport(new URL(handle.url), {
|
|
112
|
+
const client = new sdkClient.Client({ name: "sdk-test-client", version: "1.0.0" });
|
|
113
|
+
const transport = new sdkTransport.StreamableHTTPClientTransport(new URL(handle.url), {
|
|
107
114
|
fetch: nodeFetch,
|
|
108
115
|
});
|
|
109
116
|
try {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tiny-http-mcp-server",
|
|
3
3
|
"version": "0.1.0",
|
|
4
|
-
"private": true,
|
|
5
4
|
"description": "Minimal MCP server over HTTP built on tiny-stdio-mcp-server",
|
|
6
5
|
"type": "module",
|
|
7
6
|
"main": "dist/index.js",
|
|
@@ -21,13 +20,16 @@
|
|
|
21
20
|
},
|
|
22
21
|
"scripts": {
|
|
23
22
|
"build": "node ../../scripts/guard-package-dist.mjs && tsc",
|
|
23
|
+
"prepack": "node ../../scripts/set-bin-executable.mjs && node ../../scripts/manage-bundled-workspace-deps.mjs prepare . mcp-oauth auth-store tiny-mcp-client",
|
|
24
|
+
"postpack": "node ../../scripts/manage-bundled-workspace-deps.mjs cleanup . mcp-oauth auth-store tiny-mcp-client",
|
|
24
25
|
"prepublishOnly": "tsc"
|
|
25
26
|
},
|
|
26
27
|
"files": [
|
|
28
|
+
"LICENSE",
|
|
27
29
|
"dist"
|
|
28
30
|
],
|
|
29
31
|
"engines": {
|
|
30
|
-
"node": ">=
|
|
32
|
+
"node": ">=20"
|
|
31
33
|
},
|
|
32
34
|
"repository": {
|
|
33
35
|
"type": "git",
|
|
@@ -36,21 +38,22 @@
|
|
|
36
38
|
},
|
|
37
39
|
"license": "MIT",
|
|
38
40
|
"dependencies": {
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
"peerDependencies": {
|
|
43
|
-
"express": "^5.1.0"
|
|
41
|
+
"express": "^5.1.0",
|
|
42
|
+
"jose": "^6.1.2",
|
|
43
|
+
"tiny-stdio-mcp-server": "^0.1.0"
|
|
44
44
|
},
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
"bundleDependencies": [
|
|
46
|
+
"mcp-oauth",
|
|
47
|
+
"auth-store",
|
|
48
|
+
"tiny-mcp-client"
|
|
49
|
+
],
|
|
50
|
+
"optionalDependencies": {
|
|
51
|
+
"mcp-oauth": "*",
|
|
52
|
+
"auth-store": "*",
|
|
53
|
+
"tiny-mcp-client": "*"
|
|
49
54
|
},
|
|
50
55
|
"devDependencies": {
|
|
51
56
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
52
|
-
"@types/express": "^5.0.6"
|
|
53
|
-
"express": "^5.1.0",
|
|
54
|
-
"tiny-mcp-client": "*"
|
|
57
|
+
"@types/express": "^5.0.6"
|
|
55
58
|
}
|
|
56
59
|
}
|