@tmcp/transport-http 0.4.1 → 0.4.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/package.json CHANGED
@@ -1,19 +1,22 @@
1
1
  {
2
2
  "name": "@tmcp/transport-http",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Transport for TMCP using HTTP",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
- "types": "src/index.d.ts",
7
+ "types": "src/types/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
- "types": "./src/index.d.ts",
10
+ "types": "./src/types/index.d.ts",
11
11
  "default": "./src/index.js"
12
12
  },
13
13
  "./package.json": "./package.json"
14
14
  },
15
+ "files": [
16
+ "src/**/*"
17
+ ],
15
18
  "peerDependencies": {
16
- "tmcp": "^1.7.1"
19
+ "tmcp": "^1.8.1"
17
20
  },
18
21
  "keywords": [
19
22
  "tmcp",
@@ -26,15 +29,21 @@
26
29
  "directory": "packages/transport-http"
27
30
  },
28
31
  "devDependencies": {
32
+ "@modelcontextprotocol/sdk": "^1.16.0",
29
33
  "@types/node": "^24.0.15",
34
+ "dts-buddy": "^0.6.2",
30
35
  "publint": "^0.3.12",
31
- "tmcp": "^1.7.1"
36
+ "valibot": "^1.1.0",
37
+ "vitest": "^3.2.4",
38
+ "@tmcp/adapter-valibot": "^0.1.3",
39
+ "tmcp": "^1.8.1"
32
40
  },
33
41
  "publishConfig": {
34
42
  "access": "public"
35
43
  },
36
44
  "scripts": {
37
- "generate:types": "tsc ./src/*.js --declaration --emitDeclarationOnly --target esnext --allowJs --moduleresolution nodenext --module nodenext && publint",
38
- "prepublish": "pnpm generate:types"
45
+ "generate:types": "dts-buddy && publint",
46
+ "prepublish": "pnpm generate:types",
47
+ "test": "vitest --run"
39
48
  }
40
49
  }
@@ -0,0 +1,18 @@
1
+ declare module '@tmcp/transport-http' {
2
+ import type { McpServer } from 'tmcp';
3
+ export class HttpTransport {
4
+
5
+ constructor(server: McpServer<any>, options?: HttpTransportOptions);
6
+
7
+ respond(request: Request): Promise<Response | null>;
8
+ #private;
9
+ }
10
+ export type HttpTransportOptions = {
11
+ getSessionId?: () => string;
12
+ path?: string;
13
+ };
14
+
15
+ export {};
16
+ }
17
+
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,15 @@
1
+ {
2
+ "version": 3,
3
+ "file": "index.d.ts",
4
+ "names": [
5
+ "HttpTransport"
6
+ ],
7
+ "sources": [
8
+ "../index.js"
9
+ ],
10
+ "sourcesContent": [
11
+ null
12
+ ],
13
+ "mappings": ";;cAaaA,aAAaA",
14
+ "ignoreList": []
15
+ }
package/CHANGELOG.md DELETED
@@ -1,49 +0,0 @@
1
- # @tmcp/transport-http
2
-
3
- ## 0.4.1
4
-
5
- ### Patch Changes
6
-
7
- - 77d3257: fix: respond immediately to allow for requests from the server
8
-
9
- ## 0.4.0
10
-
11
- ### Minor Changes
12
-
13
- - 8f09cd2: fix: send requests back on the same stream if available
14
-
15
- ## 0.3.0
16
-
17
- ### Minor Changes
18
-
19
- - 3847654: fix: answer with conflict for second SSE connection
20
-
21
- ### Patch Changes
22
-
23
- - Updated dependencies [1b50780]
24
- - tmcp@1.7.1
25
-
26
- ## 0.2.1
27
-
28
- ### Patch Changes
29
-
30
- - f5d8390: fix: optional `getSessionId`
31
-
32
- ## 0.2.0
33
-
34
- ### Minor Changes
35
-
36
- - d12964e: breaking: correctly handle http requests
37
-
38
- ### Patch Changes
39
-
40
- - Updated dependencies [d921480]
41
- - tmcp@1.7.0
42
-
43
- ## 0.1.1
44
-
45
- ### Patch Changes
46
-
47
- - 41fb096: fix: use new sessions management
48
- - Updated dependencies [41fb096]
49
- - tmcp@1.4.0
package/jsconfig.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "esnext",
4
- "module": "nodenext",
5
- "moduleResolution": "nodenext",
6
- "allowJs": true,
7
- "checkJs": true,
8
- "declaration": true,
9
- "emitDeclarationOnly": false,
10
- "strict": true,
11
- "noEmit": true,
12
- "skipLibCheck": true
13
- },
14
- "include": ["src/**/*"],
15
- "exclude": ["node_modules"]
16
- }
package/src/index.d.ts DELETED
@@ -1,20 +0,0 @@
1
- export class HttpTransport {
2
- /**
3
- *
4
- * @param {McpServer<any>} server
5
- * @param {HttpTransportOptions} [options]
6
- */
7
- constructor(server: McpServer<any>, options?: HttpTransportOptions);
8
- /**
9
- *
10
- * @param {Request} request
11
- * @returns {Promise<Response | null>}
12
- */
13
- respond(request: Request): Promise<Response | null>;
14
- #private;
15
- }
16
- export type HttpTransportOptions = {
17
- getSessionId?: () => string;
18
- path?: string;
19
- };
20
- import type { McpServer } from "tmcp";