@decocms/bindings 1.0.1-alpha.16 → 1.0.1-alpha.18

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/README.md CHANGED
@@ -621,14 +621,14 @@ This will generate ESM output in the `dist/` directory with TypeScript declarati
621
621
 
622
622
  ### Testing
623
623
 
624
- Tests are written with [Vitest](https://vitest.dev/):
624
+ Tests are written with [Bun](https://bun.com/docs/test):
625
625
 
626
626
  ```bash
627
627
  # Run tests once
628
- bun run test
628
+ bun test
629
629
 
630
630
  # Watch mode
631
- bun run test:watch
631
+ bun test --watch
632
632
  ```
633
633
 
634
634
  ## Publishing
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@decocms/bindings",
3
- "version": "1.0.1-alpha.16",
3
+ "version": "1.0.1-alpha.18",
4
4
  "type": "module",
5
5
  "scripts": {
6
- "test": "vitest run",
7
- "test:watch": "vitest"
6
+ "check": "tsc --noEmit",
7
+ "test": "bun test"
8
8
  },
9
9
  "dependencies": {
10
10
  "@modelcontextprotocol/sdk": "1.20.2",
@@ -21,13 +21,10 @@
21
21
  "./agent": "./src/well-known/agent.ts",
22
22
  "./workflow": "./src/well-known/workflow.ts"
23
23
  },
24
- "devDependencies": {
25
- "vitest": "3.2.4"
26
- },
27
24
  "engines": {
28
25
  "node": ">=24.0.0"
29
26
  },
30
27
  "publishConfig": {
31
28
  "access": "public"
32
29
  }
33
- }
30
+ }
@@ -103,6 +103,13 @@ export const bindingClient = <TDefinition extends readonly ToolBinder[]>(
103
103
  forClient: (client: ServerClient): MCPClientFetchStub<TDefinition> => {
104
104
  return createMCPFetchStub<TDefinition>({
105
105
  client,
106
+ streamable: binder.reduce(
107
+ (acc, tool) => {
108
+ acc[tool.name] = tool.streamable === true;
109
+ return acc;
110
+ },
111
+ {} as Record<string, boolean>,
112
+ ),
106
113
  });
107
114
  },
108
115
  forConnection: (
@@ -6,4 +6,6 @@ export {
6
6
  type CreateStubAPIOptions,
7
7
  type MCPClientFetchStub,
8
8
  type MCPClientStub,
9
+ type ServerClient,
9
10
  } from "./mcp";
11
+ export { bindingClient } from "../binder";
@@ -2,7 +2,7 @@
2
2
  import { z } from "zod";
3
3
  import type { MCPConnection } from "../connection";
4
4
  import { createMCPClientProxy } from "./proxy";
5
-
5
+ export type { ServerClient } from "./mcp-client";
6
6
  export const isStreamableToolBinder = (
7
7
  toolBinder: ToolBinder,
8
8
  ): toolBinder is ToolBinder<string, any, any, true> => {
@@ -6,6 +6,7 @@
6
6
 
7
7
  import { z } from "zod";
8
8
  import type { Binder } from "../core/binder";
9
+ export type { ServerClient } from "../core/client/mcp-client";
9
10
 
10
11
  /**
11
12
  * MCP Configuration Output Schema
@@ -1,4 +1,4 @@
1
- import { describe, expect, it } from "vitest";
1
+ import { describe, expect, it } from "bun:test";
2
2
  import { z } from "zod";
3
3
  import {
4
4
  createBindingChecker,
package/test/mcp.test.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { describe, expect, it } from "vitest";
1
+ import { describe, expect, it } from "bun:test";
2
2
  import {
3
3
  MCP_BINDING,
4
4
  McpConfigurationOutputSchema,
package/vitest.config.ts DELETED
@@ -1,8 +0,0 @@
1
- import { defineConfig } from "vitest/config";
2
-
3
- export default defineConfig({
4
- test: {
5
- globals: true,
6
- environment: "node",
7
- },
8
- });