@effected/mcp 0.1.0 → 0.1.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/McpHarness.js CHANGED
@@ -39,8 +39,10 @@ import { McpProtocol } from "effect/unstable/ai";
39
39
  * the wire. Assert it empty.
40
40
  * - On a stateful revision (the default `2025-11-25`), send `initialize`
41
41
  * first. Every other request before it fails with `NotInitialized` and
42
- * is never written: the server would only answer an opaque
43
- * `Invalid request metadata`, `ping` included.
42
+ * is never written, `ping` included: the server would only answer an
43
+ * opaque refusal, `-32602 Invalid request metadata` when a stateless
44
+ * adapter is listed first (as in `McpStdio.protocols`), or
45
+ * `-32603 Internal error` when only stateful revisions are served.
44
46
  *
45
47
  * @public
46
48
  */
package/McpTestFailure.js CHANGED
@@ -20,8 +20,9 @@ import { Schema } from "effect";
20
20
  * because stdin closed while the request was in flight.
21
21
  * - `NotInitialized` (`McpHarness`): a request other than `initialize` was
22
22
  * made on a stateful revision before `initialize` was sent. The request
23
- * is never written; the server would only have refused it with an opaque
24
- * `Invalid request metadata`.
23
+ * is never written; the server would only have refused it opaquely:
24
+ * `-32602 Invalid request metadata` when a stateless adapter is listed
25
+ * first, `-32603 Internal error` when only stateful revisions are served.
25
26
  * - `ErrorResponse` (`McpHarness.listTools`): the server answered with a
26
27
  * JSON-RPC error where a result was required. Every other request method
27
28
  * returns the whole response, error included, as data.
package/README.md CHANGED
@@ -156,8 +156,8 @@ below.
156
156
  `McpStdio.layer` is core's `McpServer.layerStdio` with every log line sent to
157
157
  stderr, and with stdin read through a guard. Core's own stdio decoder throws on
158
158
  a line that is not JSON without ever trimming it from its buffer, so one bad
159
- line wedges the server: every later request goes unanswered while stdin EOF
160
- still exits 0. The guard frames stdin exactly as core does — one streaming
159
+ line wedges the server: every later request goes unanswered, yet the process
160
+ still ends at stdin EOF exactly as a healthy session does. The guard frames stdin exactly as core does — one streaming
161
161
  UTF-8 decoder, a byte-order mark stripped only at the start of the stream,
162
162
  lines split on `\n` — and answers each line core would choke on itself, on
163
163
  stdout:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "private": false,
5
5
  "description": "The boundary layer of an effect/unstable/ai MCP server: stdio wiring that keeps stdout the wire, tool-failure shaping, strict-input walkers, and test clients",
6
6
  "keywords": [
package/testing.d.ts CHANGED
@@ -25,8 +25,9 @@ declare const McpTestFailure_base: Schema.Class<McpTestFailure, Schema.TaggedStr
25
25
  * because stdin closed while the request was in flight.
26
26
  * - `NotInitialized` (`McpHarness`): a request other than `initialize` was
27
27
  * made on a stateful revision before `initialize` was sent. The request
28
- * is never written; the server would only have refused it with an opaque
29
- * `Invalid request metadata`.
28
+ * is never written; the server would only have refused it opaquely:
29
+ * `-32602 Invalid request metadata` when a stateless adapter is listed
30
+ * first, `-32603 Internal error` when only stateful revisions are served.
30
31
  * - `ErrorResponse` (`McpHarness.listTools`): the server answered with a
31
32
  * JSON-RPC error where a result was required. Every other request method
32
33
  * returns the whole response, error included, as data.
@@ -140,8 +141,10 @@ interface McpHarnessOptions {
140
141
  * the wire. Assert it empty.
141
142
  * - On a stateful revision (the default `2025-11-25`), send `initialize`
142
143
  * first. Every other request before it fails with `NotInitialized` and
143
- * is never written: the server would only answer an opaque
144
- * `Invalid request metadata`, `ping` included.
144
+ * is never written, `ping` included: the server would only answer an
145
+ * opaque refusal, `-32602 Invalid request metadata` when a stateless
146
+ * adapter is listed first (as in `McpStdio.protocols`), or
147
+ * `-32603 Internal error` when only stateful revisions are served.
145
148
  *
146
149
  * @public
147
150
  */