io.github.icohangar-ops/chp-mcp
Official@cubiczan/chp
TypeScript向けコンセンサス・ハードニング・プロトコル — プロファイルB キャピタルゲート、カノニカルJSON、署名付き監査台帳。
公式プロトコルリポジトリ: icohangar-ops/consensus-hardening-protocol (仕様、ゴールデンベクター、Python参照実装)
インストール
npm(本パッケージ)
npm install @cubiczan/chpPyPI(Python参照実装)
pip install consensus-hardening-protocolプロファイルAの審議ツールと、規範となる仕様。このnpmパッケージは、支出/委任ゲート向けのインストール可能なTypeScriptサーフェスです。
@cubiczan/codesentinel-mcpと同じチャネル形状を持ちます。
Related MCP server: @cubiczan/chp-mcp
構成要素の関係
CHPがエンジンです。MCPサーバーはトランスポートです。
MCP client (Cursor / Claude / …)
│ tools/call
▼
┌───────────────────────────┐
│ MCP server (transport) │ ← agent-conductor, codesentinel-mcp, …
│ decision_gate │
│ decision_adversary │
│ evaluate_spend_gate │
└─────────────┬─────────────┘
│ depends on
▼
┌───────────────────────────┐
│ Published CHP packages │
│ PyPI: consensus-hardening-protocol (Profile A)
│ npm: @cubiczan/chp (Profile B) ← you are here
└───────────────────────────┘本パッケージはプロファイルB(evaluateGate / approveHuman)です。MCPサーバーにevaluate_spend_gateのような形で組み込んでください。プロファイルAの審議ツール(decision_gate、decision_adversary)はagent-conductorにあり、そちらはstdioブリッジを介してPyPIパッケージに依存しています。
MCPワンライナー
接着コードを書かずにCursor / Claude向けで使う場合:
npx -y @cubiczan/chp-mcpレジストリ名: io.github.icohangar-ops/chp-mcp。ソース: cubiczan-chp-mcp。
適合性: プロファイルB 30/30 · プロファイルA(Python) 70/70。
クイックスタート
import { evaluateGate, approveHuman } from "@cubiczan/chp";
const policy = {
max_notional: 500,
daily_cap: 2500,
hitl_threshold: 250,
min_confidence: 0.55,
allowed_actions: ["LONG", "SHORT"],
};
const decision = evaluateGate(
{ action: "LONG", asset: "ETH", notional: 300, confidence: 0.9 },
policy,
);
// → { state: "HITL_REQUIRED", requires_human: true, ... }
const locked = approveHuman(
{ action: "LONG", asset: "ETH", notional: 300, confidence: 0.9 },
policy,
"cfo@example.com",
);
// → { state: "LOCKED", allowed: true, ... }ハードルール違反(max_notional、daily_cap、min_confidence、…)は、HITL閾値テストの前に収集されます。人間が閾値を超えることは可能ですが、ポリシー違反を承認することはできません(仕様 §6.3 / §6.5)。
言語間ハッシュ
CHPコンテンツハッシュは、カノニカルJSON(仕様 §3.1)に対するSHA-256です。Pythonは整数値を100.0として出力し、JavaScriptのJSON.stringifyは100として出力します。本パッケージは、監査ダイジェストがゴールデンベクターとPython参照実装に一致するよう、プロファイルBのハッシュ対象フィールドセットをPython方式で整形します。
適合性アダプタ
npm run build
python3 path/to/spec/conformance/run_conformance.py \
--adapter-cmd "node dist/adapter.js" \
--profile BプロファイルAの操作は、FAILではなくunsupported(SKIP)として報告されます。
ライセンス
MIT
Related MCP Connectors
Governed MCP: agent audit, provenance, deterministic checks, and receipt-backed FragGate execution.
- kanonikOAuthai.kanonik
Governance runtime for compliance: verified, human-approved writes to a tamper-evident record.
Append-only decisions with provenance, supersession, retrieval, and audited MCP actions.
A paid remote MCP for Equibles, built to return verdicts, receipts, usage logs, and audit-ready JSON
Related MCP Servers
AlicenseNot gradedqualityBmaintenanceEnables MCP hosts to verify agent spending mandates and receipts, providing stateless tools for authorization, chain verification, credential verification, and DID resolution.Apache 2.0- AlicenseAqualityAmaintenanceEnables MCP clients to evaluate spend gates and manage human-in-the-loop approvals for CHP Profile B.446 npmMIT
- AlicenseAqualityAmaintenanceEnables local auditing of trading strategies through MCP checkers for point-in-time data provenance, pre-trade order validation, and regime-fragility testing, while deferring promotion verdicts to a hosted service.6MIT
- AlicenseNot gradedqualityBmaintenanceEnables users to trace regulatory rule changes to affected parties and required actions through deterministic safety gates, returning dated action plans and hash-linked evidence records. Supports 12 MCP tools over stdio or streamable HTTP for source comparison, obligation decomposition, scope assessment, planning, and evidence validation across multiple domain packs.MIT