Skip to content

chore: version packages - #166

Merged
openrouter-port-bot[bot] merged 1 commit into
mainfrom
changeset-release/main
Nov 24, 2026
Merged

openrouter-port-bot[bot] merged 1 commit into
mainfrom
changeset-release/main

Conversation

@openrouter-port-bot

@openrouter-port-bot openrouter-port-bot Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@openrouter/agent@1.3.0

Minor Changes

  • #148 733b6fe Thanks @w0nche0l! - MCP tools now keep the annotations their server reports in tools/list (readOnlyHint, destructiveHint, idempotentHint, openWorldHint, title). Read them from tool.annotations on a tool returned by createMCPTools or rehydrateMCPTools; cache snapshots store and restore them in the new SerializedMCPToolDef.annotations field. The field is absent when the server sent none, and any other key is dropped. McpToolAnnotations is exported from the package root.

    import { isMcpTool, type McpToolAnnotations } from "@openrouter/agent";
    import { createMCPTools } from "@openrouter/agent/mcp";
    
    const handle = await createMCPTools({ url: "https://mcp.example.com/mcp" });
    
    // new: `tool.annotations` holds the server's hints; absent when it sent none.
    // An absent hint has the MCP default, which is `true` for `destructiveHint`
    // and `openWorldHint`, so compare against the default, not `=== true`.
    const mayDestroy = (hints: McpToolAnnotations | undefined): boolean =>
      hints?.readOnlyHint !== true && hints?.destructiveHint !== false;
    
    const needApproval = handle.tools.filter(
      (tool) => isMcpTool(tool) && mayDestroy(tool.annotations)
    );
    
    // new: a snapshot stores the hints as `tools[].annotations` and restores them.
    const snapshot = await handle.serialize();

    A snapshot written by an earlier version has no annotations, so tools rebuilt from it have none until the server is listed again (handle.refresh(), or a staleness.maxAgeMs that has passed).

Patch Changes

  • #160 afb2641 Thanks @alexb-openrouter! - Fail closed when a blocking hook chain is aborted. If a PreToolUse or UserPromptSubmit chain stops early because its signal was aborted (an asyncTimeout on detached work expiring, or abortInflight()), the emit result now reports blocked: true instead of blocked: false, so handlers that never ran (for example a later deny guard) can no longer be skipped into an approval.

@openrouter/mcp@1.1.8

Patch Changes

@openrouter-port-bot
openrouter-port-bot Bot merged commit 0fe4cb1 into main Nov 24, 2026
7 checks passed
@openrouter-port-bot
openrouter-port-bot Bot deleted the changeset-release/main branch November 24, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants