@cosmoops/connect-sdk 0.16.0 → 0.16.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/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
3
3
  `@cosmoops/connect-sdk` follows semver, with the 0.x convention that **minor
4
4
  versions may carry breaking changes** and patch versions never do.
5
5
 
6
+ ## 0.16.1
7
+
8
+ ### Fixed
9
+
10
+ - **`McpToolResult` is a type alias, not an interface** — so `callTool()` can be
11
+ returned straight from `server.setRequestHandler(CallToolRequestSchema, ...)`.
12
+
13
+ The MCP SDK types a request handler's return as a union whose members carry an
14
+ index signature. TypeScript does not grant an interface the implicit index
15
+ signature it grants a type alias, so as an interface the result was assignable
16
+ to none of them, and the four-line wiring in 0.16.0's own documentation failed
17
+ to compile with a misleading `Property 'task' is missing`. The only way past it
18
+ was a cast, at exactly the boundary where a cast hides shape errors.
19
+
20
+ Type-level only; no runtime change, and nothing that compiled against 0.16.0
21
+ stops compiling.
22
+
6
23
  ## 0.16.0
7
24
 
8
25
  ### Added
@@ -142,4 +142,4 @@ class ConnectClient {
142
142
  }
143
143
  exports.ConnectClient = ConnectClient;
144
144
  /** Kept in step with `package.json` by `sdk.test.ts`. */
145
- exports.SDK_VERSION = "0.16.0";
145
+ exports.SDK_VERSION = "0.16.1";
@@ -138,4 +138,4 @@ export class ConnectClient {
138
138
  }
139
139
  }
140
140
  /** Kept in step with `package.json` by `sdk.test.ts`. */
141
- export const SDK_VERSION = "0.16.0";
141
+ export const SDK_VERSION = "0.16.1";
@@ -55,14 +55,25 @@ export interface McpToolDescriptor {
55
55
  idempotentHint: boolean;
56
56
  };
57
57
  }
58
- /** An MCP `tools/call` result. */
59
- export interface McpToolResult {
58
+ /**
59
+ * An MCP `tools/call` result.
60
+ *
61
+ * A **type alias rather than an interface**, and that is load-bearing rather
62
+ * than a style choice. The MCP SDK types a request handler's return as a union
63
+ * whose members carry an index signature (`[x: string]: unknown`); an interface
64
+ * is not assignable to such a type, while a type alias is - TypeScript grants
65
+ * the implicit index signature only to the latter. Declared as an interface,
66
+ * the four-line wiring in this file's own example does not compile, and the
67
+ * caller is pushed into a cast at exactly the boundary where a cast hides
68
+ * shape errors.
69
+ */
70
+ export type McpToolResult = {
60
71
  content: {
61
72
  type: "text";
62
73
  text: string;
63
74
  }[];
64
75
  isError?: boolean;
65
- }
76
+ };
66
77
  export interface StoreToolset {
67
78
  /** The derived tools, if you would rather register them yourself. */
68
79
  readonly tools: readonly StoreTool[];
@@ -109,4 +109,4 @@ export declare class ConnectClient {
109
109
  constructor(options: ConnectClientOptions);
110
110
  }
111
111
  /** Kept in step with `package.json` by `sdk.test.ts`. */
112
- export declare const SDK_VERSION = "0.16.0";
112
+ export declare const SDK_VERSION = "0.16.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmoops/connect-sdk",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "Official server-side SDK for the CosmoOps Connect platform API - Login with Connect, entitlements, billing and metering.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "commonjs",