WHP Standing について
WHP Standingは、自律型AIエージェント向けのミドルウェアです。実行前に操作の権限と来歴を確認し、許可のない状態変更を阻止します。一方、受動的な読み取りはブロックしません。
主な機能
- 01権限や来歴のない状態変更を阻止
- 02例外を投げずに判定を検査
- 03期限付きの権限範囲を適用
- 04無限ループや再帰を停止
- 05受動的な読み取りをブロックしない
活用シーン
- 01データベース書き込み前にエージェントを保護
- 02許可されていないファイル削除を防止
- 03ツール呼び出しが拒否された理由を確認
- 04エージェントの反復・再帰操作を制限
MCP 対応
READMEではミドルウェアとネットワーク評価サービスが説明されていますが、MCPサーバーであることやMCP接続方式は記載されていません。
設定
リモートサーバーはインストール不要です。クライアントを選んで設定をコピーするか、ワンクリックで導入できます。
https://standing-guard-service.lovable.app/mcpclaude mcp add --transport http wheelerhubbell-whp-standing https://standing-guard-service.lovable.app/mcp{"mcpServers":{"wheelerhubbell-whp-standing":{"type":"http","url":"https://standing-guard-service.lovable.app/mcp"}}}Cursor で開く{"servers":{"wheelerhubbell-whp-standing":{"type":"http","url":"https://standing-guard-service.lovable.app/mcp"}}}VS Code で開く{"mcpServers":{"wheelerhubbell-whp-standing":{"type":"http","url":"https://standing-guard-service.lovable.app/mcp"}}}{"mcpServers":{"wheelerhubbell-whp-standing":{"serverUrl":"https://standing-guard-service.lovable.app/mcp"}}}コマンドはターミナルで実行し、JSON は各クライアントの MCP 設定に貼り付けて再起動します。認可が必要なサーバーは初回接続時にログインを求めます。
ツール
3このツールにパラメーターはありません。
詳細
@wheelerhubbell/whp-standing-client
自律型 AI エージェント向けの、フェイルクローズ型の認識論的権限ミドルウェアです。
権限保存の原則に基づいています:$A(c) \le P(c)$(権限が出所を超えることはありません)。
Standing は、一貫性のあるすり替えを検知して阻止します。これは、AI エージェントが割り当てられたタスクを隣接する別のタスク($q \to q^*$)に密かに置き換え、その置き換えたタスクについて一貫した推論を行い、許可されていない状態変更を実行することです。
📚 事例研究と理論
- 一貫性のあるすり替え(v1.1): 命題の整合性に関する理論的な定式化と、推論が誤る前にシステムが破綻する理由です。
- Mata v. Avianca の認識論的検視: 100%検証済みの情報源を引用するエージェントが、誤った質問に答えることで失敗する様子を示す、統制されたフォレンジック分析です($Q_0 \to Q_1$)。
⚡ 1 行でできるミドルウェア統合
パッケージをインストールします:
npm install @wheelerhubbell/whp-standing-client
ツールの実行直前に guardAction を配置します:
import { guardAction } from '@wheelerhubbell/whp-standing-client';
// Before any agent tool runs:
await guardAction(toolCall, {
standing: executionContext.standing
});
// Proceed only if standing is warranted
return await tool.execute(toolCall.arguments);
エージェントが、上流からの帰属可能な許可または出所を伴わずに状態を変更する操作(ファイルの削除、データベースへの書き込み、API の変更)を試みると、境界を越える前に guardAction が StandingViolationError をスローします。
🔍 可観測性:evaluateStanding
例外をスローせずに検査するには:
import { evaluateStanding } from '@wheelerhubbell/whp-standing-client';
const decision = await evaluateStanding(toolCall, context);
if (!decision.allowed) {
console.warn(`Blocked [${decision.code}]: ${decision.message}`);
return decision;
}
診断判定オブジェクト
{
"allowed": false,
"code": "MISSING_UPSTREAM_PROVENANCE",
"actionId": "call_8cb2f1",
"toolName": "delete_database_table",
"required": ["authority", "provenance"],
"observed": {
"toolName": "delete_database_table",
"arguments": { "table": "users" },
"missing": ["provenance", "authority"]
},
"message": "Tool execution blocked for 'delete_database_table': no attributable upstream authorization or provenance."
}
🛡️ 基本セマンティクス
- デフォルトでフェイルクローズ: 有効な出所または権限を欠く状態変更操作はすべて拒否されます。
- 権限の有効期間:
valid_untilのタイムスタンプで制限されます。 - ループと再帰の上限: エージェントの無制限なループを停止します(
executionCount > maxExecutionCount)。 - 読み取りのオーバーヘッドはゼロ: パッシブな読み取り操作はブロックされずに実行されます。
🌐 検証可能なネットワーク検証
稼働中のサービスには、通常の x402 エージェント向けに簡素なエンドポイントが用意されています:subject、claim、および任意の provenance を指定する POST /v1/evaluate です。Base 上で 1.00 USDC(x402 v2)の料金がかかります。署名付きの評価記録が返されます。この記録は、封印された Standing Mark ではありません。Mark は、公開されたコントラクトに従って署名付きの送信データを受け取る POST /v1/evaluations を通じて発行されます。
公式 x402 クライアントを使用した例(自身で資金を入金し、利用上限を設定したウォレットが必要です。稼働中のサービスに対するエンドツーエンドの検証はまだ完了していません):
import { x402Client, wrapFetchWithPayment } from '@x402/fetch';
import { registerExactEvmScheme } from '@x402/evm/exact/client';
import { privateKeyToAccount } from 'viem/accounts';
const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const fetchWithPayment = wrapFetchWithPayment(fetch, client);
const res = await fetchWithPayment('https://api.wheelerhubbellpublishing.com/v1/evaluate', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
subject: 'agent-session-42',
claim: 'Agent executed system mutation',
provenance: { source: 'user-intent', authority: 'admin' }
})
});
console.log(await res.json());
まず GET /v1/contract で支払い条件を確認してください。このパッケージの StandingClient クラスは、まだ署名や支払いに対応していません。
- 稼働中のサービス: https://api.wheelerhubbellpublishing.com
- ディスカバリー: /.well-known/x402
- プロトコル: x402-v2 / Base Network
ライセンス
MIT © Wheeler Hubbell Publishing
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。