From 8c22c426ebdb747e5aaca71ebf2b9e6397840cec Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 12 Aug 2026 02:19:01 +0000 Subject: [PATCH] chore: version packages --- .changeset/agent-mcp-subpath.md | 24 ------------ .changeset/agent-tool-set.md | 36 ------------------ packages/agent/CHANGELOG.md | 63 +++++++++++++++++++++++++++++++ packages/agent/package.json | 4 +- packages/agent/src/mcp/version.ts | 2 +- packages/mcp/CHANGELOG.md | 29 ++++++++++++++ packages/mcp/package.json | 2 +- 7 files changed, 96 insertions(+), 64 deletions(-) delete mode 100644 .changeset/agent-mcp-subpath.md delete mode 100644 .changeset/agent-tool-set.md diff --git a/.changeset/agent-mcp-subpath.md b/.changeset/agent-mcp-subpath.md deleted file mode 100644 index 60a806ab..00000000 --- a/.changeset/agent-mcp-subpath.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -"@openrouter/agent": minor -"@openrouter/mcp": minor ---- - -Add the full MCP integration under the canonical `@openrouter/agent/mcp` subpath. `@modelcontextprotocol/client` is an optional peer, so base agent installations and imports do not install or load MCP support. The existing `@openrouter/mcp` package remains as a compatibility facade and now re-exports the canonical agent subpaths. - -```ts -import { callModel, OpenRouter } from '@openrouter/agent'; -import { createMCPTools } from '@openrouter/agent/mcp'; - -const mcp = await createMCPTools({ url: 'https://mcp.example.com/mcp' }); -const result = callModel(new OpenRouter(), { - model: 'openai/gpt-4o-mini', - input: 'Use the remote tools.', - tools: mcp.tools, -}); -``` - -Install `@modelcontextprotocol/client` alongside `@openrouter/agent` when using `/mcp`. The SDK is loaded lazily, so importing the base agent or the MCP entry point does not require the peer; the first MCP connection attempt without it throws an actionable `MCPMissingPeerDependencyError`. - -Existing `@openrouter/mcp` imports continue to work as tooling-visible deprecated migration facades, but new code should prefer `@openrouter/agent/mcp`. The facade would only be removed in a future breaking release after migration notice. - -The `@openrouter/mcp` facade continues to install `@modelcontextprotocol/client` transitively for backward compatibility; only direct `@openrouter/agent/mcp` users need to add the optional peer explicitly. diff --git a/.changeset/agent-tool-set.md b/.changeset/agent-tool-set.md deleted file mode 100644 index 2493e63c..00000000 --- a/.changeset/agent-tool-set.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -"@openrouter/agent": minor ---- - -Add `@openrouter/agent/tool-set` (port of ai-tool-set v1.0.0, MIT © Chris Cook): declarative activate / deactivate / activateWhen / deactivateWhen for tools with state- and context-aware predicates. Integrates with a new `activeTools?: readonly string[]` option on `callModel` that filters which tools are sent to the model for a given call. - -```ts -import { callModel, OpenRouter, serverTool, tool } from '@openrouter/agent'; -import { createToolSet } from '@openrouter/agent/tool-set'; -import { z } from 'zod/v4'; - -type AppContext = { accountId: string }; - -// Curried form preserves the literal name for correlated tool event types. -const listOrders = tool()({ - name: 'list_orders', - inputSchema: z.object({}), - execute: async (_params, ctx) => ({ accountId: ctx?.shared.accountId, orders: [] }), -}); -// override the default `server:${type}` id -const search = serverTool({ type: 'web_search_2025_08_26' }, { id: 'public_search' }); - -const toolSet = createToolSet({ tools: [listOrders, search] as const }).deactivate( - 'list_orders', -); - -const client = new OpenRouter({ apiKey: process.env['OPENROUTER_API_KEY'] }); -const resolved = toolSet.resolve(); - -// resolved.callModel is `{ tools, activeTools }` — spread it straight in -const result = callModel(client, { - model: 'openai/gpt-4o-mini', - input: 'Search for OpenRouter pricing.', - ...resolved.callModel, -}); -``` diff --git a/packages/agent/CHANGELOG.md b/packages/agent/CHANGELOG.md index ee35d5f1..114b7bbe 100644 --- a/packages/agent/CHANGELOG.md +++ b/packages/agent/CHANGELOG.md @@ -1,5 +1,68 @@ # @openrouter/agent +## 0.10.0 + +### Minor Changes + +- [#102](https://github.com/OpenRouterTeam/typescript-agent/pull/102) [`787cbf8`](https://github.com/OpenRouterTeam/typescript-agent/commit/787cbf8b22bf2b8071e81e2dbf84ecd871a5e824) Thanks [@LukasParke](https://github.com/LukasParke)! - Add the full MCP integration under the canonical `@openrouter/agent/mcp` subpath. `@modelcontextprotocol/client` is an optional peer, so base agent installations and imports do not install or load MCP support. The existing `@openrouter/mcp` package remains as a compatibility facade and now re-exports the canonical agent subpaths. + + ```ts + import { callModel, OpenRouter } from "@openrouter/agent"; + import { createMCPTools } from "@openrouter/agent/mcp"; + + const mcp = await createMCPTools({ url: "https://mcp.example.com/mcp" }); + const result = callModel(new OpenRouter(), { + model: "openai/gpt-4o-mini", + input: "Use the remote tools.", + tools: mcp.tools, + }); + ``` + + Install `@modelcontextprotocol/client` alongside `@openrouter/agent` when using `/mcp`. The SDK is loaded lazily, so importing the base agent or the MCP entry point does not require the peer; the first MCP connection attempt without it throws an actionable `MCPMissingPeerDependencyError`. + + Existing `@openrouter/mcp` imports continue to work as tooling-visible deprecated migration facades, but new code should prefer `@openrouter/agent/mcp`. The facade would only be removed in a future breaking release after migration notice. + + The `@openrouter/mcp` facade continues to install `@modelcontextprotocol/client` transitively for backward compatibility; only direct `@openrouter/agent/mcp` users need to add the optional peer explicitly. + +- [#31](https://github.com/OpenRouterTeam/typescript-agent/pull/31) [`8d2ed61`](https://github.com/OpenRouterTeam/typescript-agent/commit/8d2ed61964aa063936763c7b80f6b5bf389fa144) Thanks [@mattapperson](https://github.com/mattapperson)! - Add `@openrouter/agent/tool-set` (port of ai-tool-set v1.0.0, MIT © Chris Cook): declarative activate / deactivate / activateWhen / deactivateWhen for tools with state- and context-aware predicates. Integrates with a new `activeTools?: readonly string[]` option on `callModel` that filters which tools are sent to the model for a given call. + + ```ts + import { callModel, OpenRouter, serverTool, tool } from "@openrouter/agent"; + import { createToolSet } from "@openrouter/agent/tool-set"; + import { z } from "zod/v4"; + + type AppContext = { accountId: string }; + + // Curried form preserves the literal name for correlated tool event types. + const listOrders = tool()({ + name: "list_orders", + inputSchema: z.object({}), + execute: async (_params, ctx) => ({ + accountId: ctx?.shared.accountId, + orders: [], + }), + }); + // override the default `server:${type}` id + const search = serverTool( + { type: "web_search_2025_08_26" }, + { id: "public_search" } + ); + + const toolSet = createToolSet({ + tools: [listOrders, search] as const, + }).deactivate("list_orders"); + + const client = new OpenRouter({ apiKey: process.env["OPENROUTER_API_KEY"] }); + const resolved = toolSet.resolve(); + + // resolved.callModel is `{ tools, activeTools }` — spread it straight in + const result = callModel(client, { + model: "openai/gpt-4o-mini", + input: "Search for OpenRouter pricing.", + ...resolved.callModel, + }); + ``` + ## 0.9.0 ### Minor Changes diff --git a/packages/agent/package.json b/packages/agent/package.json index cd1908ea..b9163287 100644 --- a/packages/agent/package.json +++ b/packages/agent/package.json @@ -1,8 +1,8 @@ { "name": "@openrouter/agent", - "version": "0.9.0", + "version": "0.10.0", "author": "OpenRouter", - "description": "Agent toolkit for building AI applications with OpenRouter \u2014 tool orchestration, streaming, multi-turn conversations, and format compatibility.", + "description": "Agent toolkit for building AI applications with OpenRouter — tool orchestration, streaming, multi-turn conversations, and format compatibility.", "keywords": [ "openrouter", "agent", diff --git a/packages/agent/src/mcp/version.ts b/packages/agent/src/mcp/version.ts index 67ad4938..a5e6528c 100644 --- a/packages/agent/src/mcp/version.ts +++ b/packages/agent/src/mcp/version.ts @@ -2,4 +2,4 @@ // Run `pnpm --filter @openrouter/agent gen:version` after bumping the version. /** This package's version, self-reported to MCP servers as `clientInfo`. */ -export const PACKAGE_VERSION = '0.9.0'; +export const PACKAGE_VERSION = '0.10.0'; diff --git a/packages/mcp/CHANGELOG.md b/packages/mcp/CHANGELOG.md index bb7e6d33..56e08841 100644 --- a/packages/mcp/CHANGELOG.md +++ b/packages/mcp/CHANGELOG.md @@ -1,5 +1,34 @@ # @openrouter/mcp +## 1.1.0 + +### Minor Changes + +- [#102](https://github.com/OpenRouterTeam/typescript-agent/pull/102) [`787cbf8`](https://github.com/OpenRouterTeam/typescript-agent/commit/787cbf8b22bf2b8071e81e2dbf84ecd871a5e824) Thanks [@LukasParke](https://github.com/LukasParke)! - Add the full MCP integration under the canonical `@openrouter/agent/mcp` subpath. `@modelcontextprotocol/client` is an optional peer, so base agent installations and imports do not install or load MCP support. The existing `@openrouter/mcp` package remains as a compatibility facade and now re-exports the canonical agent subpaths. + + ```ts + import { callModel, OpenRouter } from "@openrouter/agent"; + import { createMCPTools } from "@openrouter/agent/mcp"; + + const mcp = await createMCPTools({ url: "https://mcp.example.com/mcp" }); + const result = callModel(new OpenRouter(), { + model: "openai/gpt-4o-mini", + input: "Use the remote tools.", + tools: mcp.tools, + }); + ``` + + Install `@modelcontextprotocol/client` alongside `@openrouter/agent` when using `/mcp`. The SDK is loaded lazily, so importing the base agent or the MCP entry point does not require the peer; the first MCP connection attempt without it throws an actionable `MCPMissingPeerDependencyError`. + + Existing `@openrouter/mcp` imports continue to work as tooling-visible deprecated migration facades, but new code should prefer `@openrouter/agent/mcp`. The facade would only be removed in a future breaking release after migration notice. + + The `@openrouter/mcp` facade continues to install `@modelcontextprotocol/client` transitively for backward compatibility; only direct `@openrouter/agent/mcp` users need to add the optional peer explicitly. + +### Patch Changes + +- Updated dependencies [[`787cbf8`](https://github.com/OpenRouterTeam/typescript-agent/commit/787cbf8b22bf2b8071e81e2dbf84ecd871a5e824), [`8d2ed61`](https://github.com/OpenRouterTeam/typescript-agent/commit/8d2ed61964aa063936763c7b80f6b5bf389fa144)]: + - @openrouter/agent@0.10.0 + ## 1.0.0 ### Major Changes diff --git a/packages/mcp/package.json b/packages/mcp/package.json index 8b03adf0..c1fa60ea 100644 --- a/packages/mcp/package.json +++ b/packages/mcp/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/mcp", - "version": "1.0.0", + "version": "1.1.0", "engines": { "node": ">=20" },