AIニュース最前線
最新ニュースAI日報Hacker日報週報動画AIツールトレンド企業

AIニュース最前線

世界中のAI最新情報を日本語で毎時更新

最新ニュース日報トレンド企業プレミアムRSS
© 2026 ainew.jp特定商取引法に基づく表記
ニュース一覧元記事を開く
Cursor Changelog·2026年6月4日 09:00·約8分で読める

Cursor SDK にカスタムストア、カスタムツール、自動レビュー機能を追加

TL;DR

Cursor は TypeScript および Python SDK の新機能として、エージェントや実行メタデータの保存方法の選択、独自関数のツール化、ローカルツールの自動レビュールーティング、サブエージェントのネスト対応を実装しました。これにより、プロダクションスクリプトや CI 環境での利用が容易になります。

TypeScript および Python SDK の両方で一連の新しい機能がリリースされました。これにより、エージェントおよび実行メタデータの永続化方法を選択できるようになり、独自の関数をツールとしてエージェントに公開したり、ローカルツールの呼び出しを自動レビュー経由でルーティングしたり、サブエージェントを任意の深さまでネストすることが可能になりました。今回のリリースではまた、ローカルおよびクラウド SDK エージェントがプロダクションスクリプト、CI、カスタム統合環境でより実行しやすくなるよう、信頼性、パフォーマンス、プラットフォームに関する修正も含まれています。

カスタムツール

これからは、Agent.create() または send() 時に local.customTools を介して関数定義を渡すことで、ローカルエージェントに独自のツールを手渡せるようになりました。SDK はこれらのツールを custom-user-tools という組み込み MCP サーバーを通じてエージェントに公開するため、モデルは他のどの MCP ツールと同様のパスと権限ゲートを通じてコードを呼び出します。

以前は、独自機能を公開するには、独自の stdio またはリモート HTTP MCP サーバーを立ててエージェントに接続する必要がありました。しかし今では、関数定義だけで十分です。カスタムツールは親エージェントのすべてのサブエージェントからも参照可能となるため、一度定義したツールは実行全体で利用可能です。

自動レビュー

デフォルトでは、ヘッドレス実行では人間がループに参加しないため、ローカル SDK エージェントは承認を求めずにツールの呼び出しを実行します。local.autoReview を設定することで、これらの呼び出しを自動レビュー経由でルーティングできます。これはレビューを完全にバイパスするのではなく、どの呼び出しを自動的に実行し、どの呼び出しを保留するかを分類器が判断する仕組みです。

permissions.json ファイル内で、自然言語の指示を用いてこの分類器を制御できます。autoRun.allow_instructions フィールドは許可する傾向にある呼び出し形状を記述し、autoRun.block_instructions フィールドはレビュー保留が必要なものを記述します。例えば、ビルド成果物の読み取り専用検査は許可しつつ、削除のような破壊的な操作については常に一時停止させることができます。

`jsonc { "autoRun": { "allow_instructions": [ "Read-only inspections of build artifacts under ./dist are fine." ], "block_instructions": [ "Always pause delete operations so I get a chance to review them." ] } } `

JSONL とカスタムストア

両方の SDK はエージェントおよび実行のメタデータを永続化するため、プロセス再起動後にエージェントを再開できます。これまでこのストアは SQLite でしたが、現在は JSONL ストアを選択できるようになりました。これは、読み取り・差分比較・バージョン管理へのチェックインが可能なプレーンな追加専用ファイルに書き込むものです。SqliteLocalAgentStore と JsonlLocalAgentStore はどちらも直接エクスポートされます。

デフォルトのいずれも環境設定に適合しない場合は、パブリックな LocalAgentStore インターフェースを実装し、それを local.store を通じて渡してください。一時的な CI 実行用のメモリ内ストアを構築するか、エージェントの状態をアプリケーションデータの一部として維持したい場合は、永続化のバックエンドに Postgres を使用します。Python SDK はブリッジを通じてホスト、JSONL、および合成された JSONL ストアを公開しています。

ネストされたサブエージェント

サブエージェントは現在、独自のサブエージェントを生成できるようになりました。レビュー担当のサブエージェントがテスト作成者に委任し、その作成者がさらに別のレベルに委任することも可能で、各レベルは独自のプロンプトとモデルを保持します。有効化するスイッチはありません。サブエージェントセッションは必要な実行体を登録し、Task を呼び出す必要があるため、サブエージェントを定義するあらゆるエージェントでネストが自動的に機能します。

信頼性、パフォーマンス、およびプラットフォームの改善

本リリースでは、両 SDK において一連の利便性向上のための修正も含まれています。

信頼性

実行相関: すべての send() メソッドに、プラットフォーム生成型の requestId が付与されるようになりました。これは Run および RunResult で公開され、メモリ内ストレージ、SQLite、JSONL ストア間で永続化されます。これにより、agentId から推測することなく、スクリプトや CI 実行をバックエンドログ、分析データ、サポートスレッドに紐付けることが可能になります。

ローカル実行における信頼性の高い wait(): ローカル実行において、ターミナル結果が書き込まれる前に wait() が解決されることはなくなりました。ハイドレーションは実行が最終状態に達するまで継続して更新されるため、自動化スクリプトは完全な結果を読み取ることができます。

破棄時の安全なチェックポイント: ルート参照が存在しない場合でもチェックポイントのブローブ(blob)が残っている状態でローカルエージェントを破棄しても、チェックポイントデータが削除されることはなくなりました。エージェントディレクトリがクリアされるのは、本当に保持すべきものが何もない場合のみです。

HTTP/1.1 によるクラウドストリーミング: クラウドエージェントセッションは、一部のプロキシや古い Node fetch スタック、特定の CI イメージで使用されている HTTP/1.1 トランスポート上でも正しくストリーミングされるようになりました。HTTP/2 の動作には変更はありません。

パフォーマンスとパッケージング

軽量なインポート: @cursor/sdk をインポートしても、ローカルエージェントスタック全体が即座に読み込まれることはなくなりました。クラウド専用および型専用の利用者は、最初のローカル呼び出しまでローカルランタイムのコストを回避できます。API 変更はありません。最初のローカル呼び出しで一度だけインコストが発生し、その後はキャッシュされた状態が維持されます。

自己完結型の TypeScript タイプ: 公開された .d.ts ファイルは、未公開のワークスペースパッケージを参照しなくなりました。これにより、skipLibCheck: false の下での TS2305 および TS2307 エラーが修正され、TurnEndedUpdate などのストリームタイプにおける沈黙的な any 型も解消されました。

バンドルされた ripgrep: ローカルシェル実行では、グローバルな PATH を変更することなく、バンドルされたプラットフォーム固有の rg バイナリが使用されます。Windows では、ripgrep の先頭追加により Path 変数が上書きされる問題も解消されました。

モデル

Composer 2 は Composer 2.5 にルーティング: 廃止された composer-2 スラッグを固定している SDK クライアントは自動的に Composer 2.5 にルーティングされ、高速なバリアントは維持されたまま、古いスクリプトも引き続き実行可能です。

Python SDK

ワークスペーススコープの list_runs: Client、AsyncClient、および Agent.list_runs はオプションの cwd を受け取り、ブリッジは起動時のワークスペースにフォールバックします。これにより、ブリッジがサブプロセスとして実行された際に発生する誤った「エージェントが見つからない」という結果が修正されました。

明確な not-found エラー: 解決されたワークスペースに含まれていないエージェントを検索した場合、不明瞭な内部エラーではなく、明確な not-found エラーが返されます。

0.1.6 リリースと分析機能: cursor-sdk 0.1.6 では Buildkite のリリースパスが文書化され、SDK の使用状況がより明確な分析のために sdk-python- というラベルで識別されるようになりました。

アップグレードするには npm install @cursor/sdk または pip install cursor-sdk を実行してください。composer-2 を固定しているスクリプトは自動的に Composer 2.5 に移行され、requestId は実行メタデータスキーマに安全に追加できます。詳細については TypeScript および Python のドキュメントをご覧ください。

原文を表示

We've shipped a batch of new functionality across the TypeScript and Python SDKs. You can now choose how agent and run metadata is persisted, expose your own functions to the agent as tools, route local tool calls through auto-review, and nest subagents to any depth. This release also brings a set of reliability, performance, and platform fixes that make local and cloud SDK agents easier to run in production scripts, CI, and custom integrations.

Custom tools

You can now hand the local agent your own tools by passing function definitions through local.customTools, on Agent.create() or per send(). The SDK exposes them to the agent through a built-in MCP server called custom-user-tools, so the model calls your code through the same path and the same permission gate as any other MCP tool.

Before this, exposing a custom capability meant standing up your own stdio or remote HTTP MCP server and wiring it into the agent. Now a function definition is enough. Custom tools are also visible to every subagent of a parent agent, so a tool you define once is available throughout the whole run.

Auto-review

By default, a local SDK agent runs tool calls without asking for approval, since there's no human in the loop in a headless run. Set local.autoReview to route those calls through auto-review instead. A classifier decides which calls run automatically and which to hold back, rather than bypassing review entirely.

You steer that classifier with natural-language instructions in permissions.json. The autoRun.allow_instructions field describes call shapes to lean toward allowing, and autoRun.block_instructions describes the ones to hold for review. For example, you can allow read-only inspections of build artifacts while always pausing on destructive operations like deletes.

`jsonc { "autoRun": { "allow_instructions": [ "Read-only inspections of build artifacts under ./dist are fine." ], "block_instructions": [ "Always pause delete operations so I get a chance to review them." ] } } `

JSONL and custom stores

Both SDKs persist agent and run metadata so you can resume an agent after a process restart. Until now, that store was SQLite. You can now opt into a JSONL store instead, which writes a plain, append-only file you can read, diff, and check into version control. Both SqliteLocalAgentStore and JsonlLocalAgentStore are exported directly.

If neither default fits your setup, implement the public LocalAgentStore interface and pass it through local.store. Build an in-memory store for ephemeral CI runs, or back persistence with Postgres when you want agent state to live next to the rest of your application data. The Python SDK exposes host, JSONL, and composed JSONL stores through the bridge.

Nested subagents

Subagents can now spawn their own subagents, and so on. A reviewer subagent can delegate to a test-writer, which can delegate further, with each level keeping its own prompt and model. There's nothing to turn on; a subagent session registers the executor it needs to call Task, so nesting works automatically for any agent that defines subagents.

Reliability, performance, and platform improvements

This release also includes a batch of quality-of-life fixes across both SDKs.

Reliability

Run correlation: Every send() now carries a platform-generated requestId, exposed on Run and RunResult and persisted across the in-memory, SQLite, and JSONL stores. Tie a script or CI run to backend logs, analytics, and support threads without inferring it from agentId.

Reliable wait() on local runs: Local runs no longer resolve wait() before the terminal result is written. Hydration keeps refreshing until the run reaches a final state, so automation reads a complete result.

Safe checkpoints on dispose: Disposing a local agent no longer removes checkpoint data when a root reference is missing but checkpoint blobs still exist. The agent directory is only cleared when there's genuinely nothing left to keep.

Cloud streaming over HTTP/1.1: Cloud agent sessions now stream correctly on HTTP/1.1 transports used by some proxies, older Node fetch stacks, and certain CI images. HTTP/2 behavior is unchanged.

Performance and packaging

Lighter import: Importing @cursor/sdk no longer eagerly loads the full local agent stack. Cloud-only and type-only consumers skip the local runtime cost until the first local call, with no API change. The first local call pays a one-time import, then stays cached.

Self-contained TypeScript types: Published .d.ts files no longer reference unpublished workspace packages. This fixes TS2305 and TS2307 errors under skipLibCheck: false and silent any on stream types like TurnEndedUpdate.

Bundled ripgrep: Local shell runs use the bundled platform rg binary without modifying your global PATH. On Windows, prepending ripgrep no longer clobbers the Path variable.

Models

Composer 2 routes to Composer 2.5: SDK clients still pinning retired composer-2 slugs are routed to Composer 2.5 automatically, keeping fast variants intact, so older scripts keep running.

Python SDK

Workspace-scoped list_runs: Client, AsyncClient, and Agent.list_runs take an optional cwd, and the bridge falls back to its launch workspace. This fixes spurious "agent not found" results when the bridge runs as a subprocess.

Clearer not-found errors: Looking up an agent that isn't in the resolved workspace returns a clear not-found error instead of an opaque internal error.

0.1.6 release and analytics: cursor-sdk 0.1.6 documents the Buildkite release path and labels SDK usage as sdk-python- for clearer analytics.

Run npm install @cursor/sdk or pip install cursor-sdk to upgrade. Scripts pinning composer-2 move to Composer 2.5 automatically, and requestId is a safe addition to your run metadata schema. See the TypeScript and Python docs for full details.

この記事をシェア

関連記事

Cursor Changelog2026年6月5日 09:00

Cursor のデザインモード機能強化

Cursor ブラウザのデザインモードが更新され、ユーザーは要素を複数選択したり音声で指示を出したりして、エージェントに UI 変更を依頼できるようになった。

Cursor Changelog2026年6月4日 09:00

Canvas のデザインモードとコンテキスト使用状況レポート機能の追加

Cursor が Canvas にデザインモードを追加し、UI 要素を直接選択・注釈して編集を指示できるようになった。また、コンテキストの使用状況を把握する新機能も導入された。

Cursor Changelog2026年6月3日 09:00

Cursor Enterprise の組織機能

Cursor が企業顧客向けに、複数のチームを一元管理し、セキュリティやガバナンス、予算、機能制御を個別に設定できる機能を一般提供開始した。

今日のまとめ

AI日報で今日の重要ニュースをまとめ読み

ニュース一覧に戻る元記事を読む