Ctxfw

io.github.heuristicolab由 GitHub 账号 heuristicolab 发布v4.1.1更新于 Nov 2, 2026

Zero-egress AI Agent Firewall: SARA prompt injection defense, AST context pruning & MCP governance.

概览

AI 生成的概览

面向编码代理的本地上下文防火墙:把源码与依赖图裁剪为精简 AST 存根,校验规格与补丁,并查询审计账本。

可以做什么
  • 按指定深度把单个源文件裁剪为接口、类型与签名存根,可选择去除文档字符串。
  • 依据项目拓扑依赖图生成经 token 裁剪的 Markdown 上下文包,可选熔断降级。
  • 按确定性规则与负向不变量评估架构说明,返回公理完备性指数。
  • 在合并前按复杂度、类型忽略、导入限制与测试结果校验统一 git diff 补丁。
  • 检索已保存的补丁评估记录,并校验哈希链审计会话。
适用场景
适合在大型代码库上使用编码代理、希望获得更小且带依赖关系的上下文,并在合并前对补丁与规格做确定性检查的团队。也适合偏好本地离线校验而非云服务的场景。
运行要求
以本地 stdio 进程运行,需从 PyPI 安装(pip 或 pipx),因此需要 Python。README 还描述了通过 CLI 初始化步骤把 MCP 服务器条目写入 Claude Code、Claude Desktop、Cursor 或 Windsurf 的配置文件。未声明任何环境变量或身份验证。
安装前请注意
初始化命令会修改已有的助手与 IDE 配置文件,README 称会先备份并以非破坏方式合并。补丁评估会追加审计记录,README 还描述了可阻止提交的 pre-commit 钩子。README 大量推广付费胶囊、捆绑包与月度团队授权,使用前应确认哪些功能免费、哪些收费。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Ctxfw,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

CTXFW // CONTEXT FIREWALL

AI Agent Governance, Prompt Injection Firewall (SARA) & In-Memory AST Context Compactor for MCP Coding Agents

[PyPI - Version] [PyPI - Downloads] [Axiomatic Completeness Index] [Tests] [License] [Glama] [Official MCP Registry] [Sovereign Vault] [Security: A — Skills Directory] [Listed on DevList]

The deterministic Zero-Egress boundary between probabilistic LLM hallucination, indirect prompt injection, and production infrastructure.

Installation • Benchmarks • CTXFW vs. Cloud WAFs • Diagnostic • Architecture • Enterprise Governance

[CTXFW v4.1.1 Live Terminal Demo — SARA Prompt Injection Gate (0.38ms), AST Context Pruner (-66.1%) & M2M Sovereign Vault]

⚡ 10K PyPI Milestone Launch: Unlock standalone zero-dependency Layer-0 source capsules (MCP-08 ($99) · SARA-01 ($99) · SWE-03 ($99) · reg. $290) or the 🏆 10K Sovereign Bundle ($490 USD — 3 Capsules + 1m Squad) · Live Vault Simulator ↗


Executive Abstract

Autonomous coding agents (Claude, Gemini, Cursor, Antigravity) consume massive context windows with bloated peripheral dependencies, triggering token exhaustion, context drift, and security degradation.

CTXFW is an open-core context firewall and Model Context Protocol (MCP) gatekeeper. It combines an in-memory polyglot AST pruner with a deterministic axiomatic intake sieve:

  1. Compacts Peripheral Code (72.4% token reduction): Replaces distance-1 and distance-2+ module implementations with clean interface signatures, type definitions, and functional stubs.
  2. Enforces Axiomatic Integrity (ACI $\ge$ 0.9000): Rejects ungrounded or deficient architecture briefs missing negative invariants ($N \ge 5$), bounded variable domains, deterministic state machines, or formal error taxonomies.
  3. Zero Telemetry Egress: Guaranteed local execution with zero network telemetry leakage on standard operating mode.

AST Pruning Benchmarks

CTXFW operates directly at the syntax tree layer using native polyglot grammars:

Benchmark DimensionRaw Context IngestionCTXFW Topological CompactorPerformance Gain / Impact
Token Consumption100% (Raw Files)27.6% (Interface Stubs)72.4% Bloat Eliminated
Engine Compaction Overhead—Native in-memory parser< 5.0 ms
Warm Cache Hit Overhead—SQLite WAL semantic cache< 0.8 ms
Stdio Telemetry EgressUnsanitized stdoutPure isolated JSON-RPCZero Egress (100% Isolated)
Axiom Verification Latency—Sieve evaluation< 12.0 ms
CI/CD Pre-Commit Latency—Headless git sentry< 85.0 ms

Empirical Case Study: ctxfw/cli.py Core Dependency Graph

Empirical context reduction metrics generated via ctxfw.resolve_context_bundle running against 16 internal dependencies:

DimensionRaw Context IngestionCTXFW Topological SievePerformance Delta
Total Context Size49,096 tokens20,014 tokens-59.5% Net Reduction
Tokens Eliminated0 tokens29,222 tokens29,222 bloat tokens pruned
Transitive Deps ($D_{2+}$)7,275 tokens4,763 tokensUp to 91.9% reduction
FinOps Cost ImpactBase CostReduced by $0.0877 USD / prompt~$87.70 USD saved per 1K calls
AST Compaction Latency—1,407.96 msIn-memory Tree-Sitter parsing
Attestation IntegrityNoneSHA-256 sealedStrict interface preservation

Topological Hierarchy Breakdown:

  • $D_0$ Target (ctxfw/cli.py): 100% Full Implementation preserved.
  • $D_1$ Direct Deps (e.g. gatekeeper.py, mcp.py): Implementation truncated to typed stubs (...). Token savings: 73% – 86%.
  • $D_2$ Transitive Deps (e.g. polyglot.py): Compact typed interface signatures. Token savings: 91.9%.
  • $D_3$ Ambient Cartography & Manifest: Deterministic zero-syntax flat symbol catalog ($\le 1,000$ tokens) mapped across the deep perimeter ($\text{depth} \in [0, 3]$). Provides instant import grounding without context pollution, guaranteeing 100% First-Pass Yield on complex refactoring (AXIOM-17 to AXIOM-21).

The Empirical Validation Trilogy (Multi-Repository Destructive A/B)

Audited on remote Linux environments (root@isolated-runner, Ubuntu 24.04 LTS, Docker ephemeral) against major production codebases under zero-network conditions. Full forensic dossier: docs/benchmarks/TRILOGY_EMPIRICAL_BENCHMARK.md.

Target RepositoryArchitectural ArchetypeActive Focal $D_0$Peripheral Perimeter $D_1$Raw Context ($D_0 + D_1$)Pruned Context ($D_0 + D_1^*$)$D_1$ Perimeter SavingsAggregate Context SavingsMCP LeaksSyntactic AST PassLatency / Throughput
zulip/zulipCoupled Django Monolithusers.py (12.9k tok)realms.py, clients.py, prereg_users.py (16.8k tok)29,68922,481-42.96% (Interface)
-78.20% (Nominal)
-24.28% (Interface)
-44.20% (Nominal)
0 B100% PASS44.1 ms
~380k tok/s
PostHog/posthogModern COSS / Data OSteam.py (14.3k tok)organization.py, user.py, project.py (20.6k tok)34,89422,637-59.53% (Interface)-35.13% (Interface)0 B100% PASS50.2 ms
~410k tok/s
apache/airflowAsync Orchestration Monorepodag.py (9.4k tok)baseoperator.py, taskinstance.py, dagrun.py (60.4k tok)69,86129,433-66.90% (Interface)
-90.26% (Nominal)
-57.87% (Interface)
-78.08% (Nominal)
0 B100% PASS138.2 ms
437,351 tok/s

Key Empirical Highlights:

  • Compression Scaling ($43% \to 60% \to 67%$): Larger real-world codebases yield greater perimeter reduction ($60.4\text{k} \to 20.0\text{k}$ tokens in Airflow D1, eliminating 40,428 bloat tokens net).
  • Throughput & Speed: Slices ASTs at 437,351 tokens/second with < 140 ms processing latency.
  • Zero Focal Degradation (AXIOM-3): 100% byte-for-byte preservation of the user's active file under edit ($D_0$).
  • Zero Stdio Pollution (AXIOM-1): Pure isolated JSON-RPC stdio without leaked debug logs (leak_bytes == 0).

AI Agent Governance & Prompt Injection Defense: CTXFW vs. Cloud Runtime WAFs

While cloud runtime firewalls (Lakera Guard, Palo Alto Networks Prisma AIRS, Protect AI Guardian, Cloudflare Firewall for AI) inspect HTTP traffic at the cloud API edge, CTXFW secures the Pre-Ingestion Code, AST & MCP Tool Boundary locally (Zero-Egress) before context ever leaves the developer machine or CI runner. Full comparative dossier: docs/benchmarks/SECURITY_VS_CLOUD_WAFS.md.

Capability / Security DimensionCTXFW (Context Firewall v4.1.0)Lakera Guard (Check Point)Palo Alto Prisma AIRSProtect AI / Cloudflare AI WAF
Enforcement BoundaryPre-Ingestion Local AST & MCP Tool stdio / ProxyCloud HTTP Prompt APICloud Network & Runtime APICloud Edge / ML Inference Proxy
Code & Data Sovereignty100% Zero-Egress (Air-Gapped Local RAM & SQLite WAL)Requires Cloud API EgressCloud / Appliance InspectionCloud Proxy Egress
Indirect Prompt Injection (MCP / Tools)Deterministic ctxfw.sara: 100.0% Recall / 0.0% FPR (<system>, [INST], Trojan-Source U+202E quarantine)Probabilistic ML ClassifierRuntime Network PolicyEdge WAF / Heuristic Classifier
FinOps Token Cost Reduction42.96% – 90.26% $D_1$ AST Bloat Pruned (~$87.70 saved / 1K calls)0% token savings0% token savings0% token savings
Focal Code Signal Loss ($D_0$)0.00% Loss (AXIOM-3: 100% byte-for-byte $D_0$ preservation)N/A (Pass-through)N/A (Pass-through)N/A (Pass-through)
Inspection Latency (P50 / P95)0.33 ms P50 / 1.72 ms P95 (SARA) · < 0.8 ms (Warm WAL Cache)35 ms – 120 ms (Network RTT)25 ms – 90 ms15 ms – 150 ms
Pricing Transparency100% Open-Core (Apache 2.0 Free CLI/MCP) + Public Fixed Pricing ($99 10K Launch Capsule · $490 3-Capsule Bundle · $199/mo Squad)Opaque Enterprise Quote ("Contact Sales")Opaque Enterprise Contract ("Contact Sales")Bundled Enterprise Add-on
Deployment Complexity1 Command (< 10s): pipx install ctxfw && ctxfw initSDK wrapper + API keysTLS decryption + routingDNS / Proxy routing

Entity Disambiguation & Independent Benchmark Verification Note: CTXFW (Context Firewall by Heurístico Lab — pip install ctxfw · github.com/heuristicolab/ctxfw · heuristicolab.com) is an open-core Python/Tree-Sitter AST & MCP governance engine. It is not affiliated with ContextWall (contextwall.io). Every CTXFW token-reduction (-59.5% on ctxfw/cli.py, -66.90% $D_1$ on apache/airflow, -72.4% interface stub compaction) and security recall (100.0% on 24 OWASP AISVS C02-01 vectors) figure is deterministically reproducible offline from source:

Run the reproducible 24-vector OWASP AISVS C02-01 & arXiv:2510.05244v2 Indirect Prompt Injection & Trojan-Source benchmark locally with zero network egress:

bash
python benchmarks/run_sara_security_benchmark.py

Installation & Multi-Surface Setup

1. PyPI Installation

bash
pip install --upgrade ctxfw# or via pipx for dedicated binary isolation:pipx install ctxfw

2. Multi-Surface MCP Auto-Configuration (v4.1.0)

Run ctxfw init or dedicated installation command ctxfw install --claude for automated zero-touch discovery and idempotent injection across your installed coding surfaces:

bash
# Targeted Claude Code CLI & Claude Desktop auto-installation:ctxfw install --claude
# Or full multi-surface discovery (Claude, Cursor, Windsurf):ctxfw init

Auto-Detected Surfaces (Triple Surface Architecture):

  1. Claude Code CLI: Injects directly into ~/.claude.json.
  2. Claude Desktop: Dynamic cross-platform detection:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
    • Linux / POSIX: ~/.config/Claude/claude_desktop_config.json
  3. Cursor IDE: Injects into .cursor/mcp.json in workspace scope.
  4. Windsurf IDE: Injects into ~/.codeium/windsurf/mcp_config.json when the .codeium directory signature is present.

Inviolable Safety & Reliability Invariants:

  • Atomic Backup Snapshot (.bak.<timestamp>): Before mutating any pre-existing configuration file, creates a timestamped immutable backup.
  • Non-Destructive Merge: Preserves 100% of pre-existing third-party MCP servers, top-level settings, and custom keys.
  • Zero-Failure Execution: Dynamically resolves the interpreter to sys.executable with ["-m", "ctxfw.mcp"] (or canonical absolute binary path if frozen via PyInstaller), completely eliminating ambient $PATH and virtualenv resolution failures.
  • 3x Idempotency: Multiple runs produce zero configuration drift and zero duplicated keys.

3. Zero-MCP Interoperability Gateway (Aider, OpenCode, Continue, CLI)

For AI developer tools and terminal agents lacking native Model Context Protocol support:

bash
# 1. Start the zero-egress local proxy server:ctxfw proxy --port 8765
# 2. Point your tool's Anthropic or OpenAI endpoint to localhost:export ANTHROPIC_BASE_URL="http://localhost:8765/v1"export OPENAI_BASE_URL="http://localhost:8765/v1"

4. Verified Registries, MCP Ecosystem Directories & Agent Skills

CTXFW is independently audited and certified with Grade A compliance across both the official Glama MCP Registry (TDQS 4.5/5.0 · Security 100/100) and Skills Directory (Security: A 100/100 across 120 static security patterns), and indexed across the 7 MCP Ecosystem Directories:

[Glama] [Official MCP Registry] [Sovereign Vault] [Security: A — Skills Directory] [Listed on DevList]

Install the verified Claude Code / Agent skills directly into .claude/skills/:

bash
npx -y skills add heuristicolab/ctxfw --skill context-firewall --agent claude-codenpx -y skills add heuristicolab/ctxfw --skill axiom-sieve --agent claude-codenpx -y skills add heuristicolab/ctxfw --skill eval-benchmark --agent claude-codenpx -y skills add heuristicolab/ctxfw --skill precommit-sentry --agent claude-code

Direct access to tool inspection, schemas, and live diagnostic telemetry on Glama and Skills Directory.


System Diagnostics

Validate local environment readiness, stdio isolation purity, SQLite WAL concurrency, and Tree-Sitter grammars with a single command:

bash
ctxfw doctor
text
========================================================================  CTXFW DOCTOR // HIGH-ASSURANCE HEALTH & ISOLATION DIAGNOSTIC========================================================================[PASS]   Python Package & sys.path        ctxfw v4.1.0 loaded cleanly.[PASS]   MCP stdio Stream Isolation       100% pure JSON-RPC on stdout. Diagnostic logs isolated to stderr.[PASS]   Global CLI Executable (PATH)     Binary 'ctxfw' found in PATH.[PASS]   Axiomatic Sieve Engine           Evaluation verified (ACI: 1.0000, Invariants: 5).[PASS]   SQLite WAL Cache & Concurrency   Journal mode: WAL, Busy timeout: 5000ms.[PASS]   Polyglot Tree-Sitter Grammars    Initialized language parsers (typescript, go, java).[PASS]   TraceKit Ledger Audit            Chain status: INTACT (1275 blocks).[PASS]   Sovereign Pentad WAL Ledgers     SARA scans: 331 | TokenCast turns: 1 (FinOps rows: 3872) | Rules: 1056 | SWE-Gate: 13.------------------------------------------------------------------------Overall Verdict:            [HEALTHY] [ATTESTED] Perimeter defense operational.========================================================================CTXFW // 72.4% AST Bloat Eliminated. Zero Telemetry Egress.Export FinOps ROI: 'ctxfw report --share' | CI Merge Gate: 'ctxfw gate'Team Squad ($199/mo flat up to 15 devs): https://ctxfw.heuristicolab.com/pricing/========================================================================

Architecture

CTXFW enforces a strict deterministic perimeter dividing probabilistic agent code from the core codebase:

PROBABILISTIC DOMAIN                      DETERMINISTIC PERIMETER┌───────────────────────┐                  ┌────────────────────────────────────────┐│  Autonomous AI Agent  │                  │             CTXFW ENGINE               ││  (Claude / Gemini /   │                  │                                        ││   Cursor / Antigravity│                  │  ┌──────────────────────────────────┐  │└───────────┬───────────┘                  │  │   Polyglot AST Topological Engine│  │            │                              │  │  - Python (ast)                  │  │            │  Target Context / Brief      │  │  - TypeScript / Go / Java (CST)  │  │            ▼                              │  │  - Multi-Depth Interface Stubs   │  │┌───────────────────────┐                  │  └────────────────┬─────────────────┘  ││ MCP Stdio Interceptor ├─────────────────►│                   │                    │└───────────────────────┘                  │  ┌────────────────┴─────────────────┐  │                                           │  │  SQLite WAL High-Concurrency     │  │                                           │  │  Semantic Cache (<5ms warm hit)  │  │                                           │  └────────────────┬─────────────────┘  │                                           │                   ▼                    │                                           │         [ ACI >= 0.9000? ]             │                                           │          /              \              │                                           │       YES                NO            │                                           │        │                  │            │                                           │        ▼                  ▼            │                                           │ ┌──────────────┐   ┌─────────────────┐ │                                           │ │ VERIFIED     │   │ QUARANTINED     │ │                                           │ │ SHA-256 Seal │   │ Execution Halt  │ │                                           │ └──────┬───────┘   └────────┬────────┘ │                                           └────────┼────────────────────┼──────────┘                                                    │                    │                                                    ▼                    ▼                                           [ Code Generation ]   [ Forensic Report ]                                           [ & Git Permitted ]   [ Pre-Commit Abort]

Key Subsystems (v4.1.0 Sovereign Pentad):

  1. Polyglot Tree-Sitter Pruner & $D_3$ Ambient Cartography:
    • Compiles topological dependency trees ($D_0$ full, $D_1$ interface, $D_2$ nominal, $D_3$ flat symbol catalog $\le 1,000$ tokens) across Python, TypeScript/JavaScript, Go, and Java.
  2. TraceKit Cryptographic Ledger (ctxfw.audit):
    • Append-only 283-byte canonical SHA-256 hash-chained audit ledger (tracekit.db) with tamper latch verification via ctxfw trace verify.
  3. TokenCast Integer Forecaster & Circuit Breaker (ctxfw.budget):
    • Zero-float integer trajectory predictor and reactive circuit breaker (CLOSED $\to$ TRIPPED / FORCE_D3_PRUNING $\to$ HALTED / EMERGENCY_HALT).
  4. Normative Rules Compiler & Enforcer (ctxfw.rules):
    • Compiles .cursorrules and CLAUDE.md negative directives into deterministic AST/path/command/import guards with 3-round iterative path-traversal normalization.
  5. SARA Agent Induction Firewall (ctxfw.sara):
    • Inspects untrusted tool observations for indirect prompt injection, role overrides (<system>, [INST]), and Trojan-Source bidi escapes (ALLOW, STRIP_COMMANDS, QUARANTINE_TOOL).
  6. SWE-Gate CI Verifier (ctxfw.swegate) & Audit Ledger Retrieval (query_audit_ledger):
    • Deterministic unified-diff and architectural regression verifier enforcing cyclomatic complexity delta bounds, disallowed module imports, and # type: ignore bans via evaluate_patch, paired with read-only forensic inspection of SweGateStore (EVL-...) and TraceKitStore (SES-...) via query_audit_ledger.

Zero-Touch Provisioning

Inject perimeter rules, MCP server declarations, and pre-commit sentinels into your workspace:

Global IDE Integration

bash
ctxfw init --global

Automatically configures Google Antigravity, Cursor, and Claude Desktop.

Repository Pre-Commit Sentry

bash
ctxfw init --repo .

Deploys .git/hooks/pre-commit to prevent uncertified code commits lacking an attested specification brief.


Enterprise Governance, Sovereign Capsules & CI/CD Gate (v4.1.1)

⚡ 10K PyPI Milestone Offer: Production Sovereign Capsules ($99 USD Single / $490 USD Bundle)

Need standalone, zero-dependency Python/FastAPI/SQLite-WAL enforcement modules (12 SHA-256 sealed artifacts + 100% passing Pytest suite) ready to drop into your repository?

Sovereign CapsuleCore Capability & SLALive Interactive Simulator1-Click Stripe Unlock
MCP-08 (mcp-schema-contract-gate)Strict JSON-RPC 2.0 & MCP Tool Schema Contract Gate (< 0.05 ms)Inspect & Run Simulator ↗💳 Unlock for $99 USD (reg. $290)
SARA-01 (sara-action-induction-runtime-auth)Sub-ms Indirect Prompt Injection & Trojan-Source Sieve (0.33 ms P50)Inspect & Run Simulator ↗💳 Unlock for $99 USD (reg. $290)
SWE-03 (swe-gate-ci-verifier)Deterministic AST Patch Sentry & Architectural Drift Gate (0.92 ms)Inspect & Run Simulator ↗💳 Unlock for $99 USD (reg. $290)
TokenCast (tokencast-budgeter)Integer Token Trajectory Forecaster & Loop Circuit Breaker (< 0.5 ms)Inspect & Run Simulator ↗💳 Unlock for $99 USD (reg. $290)
🏆 10K PyPI Sovereign Bundle3 Flagship Capsules (MCP-08 + SARA-01 + SWE-03) + 1 Month Squad PlanExplore All 9 Capsules ↗⚡ Unlock 10K Bundle ($490 USD) (Save $579)

For engineering squads requiring FinOps consolidation and automated Pull Request governance:

  • Individual Developer FinOps & LiveBench 2.0 Arbitrage (Free / Apache 2.0):
    bash
    ctxfw report --sharectxfw report --export-json ./my-ledger.json
  • Team Governance & SWE-Gate CI ($199 USD/month Flat Squad — up to 15 developers & 5 CI/CD repositories, includes 7-Day Trial):
    bash
    export CTXFW_LICENSE_KEY="CTXFW-TEAM-PRO-..."ctxfw license statusctxfw gate --diff-file pr.patch --github-summaryctxfw report --team-merge ./team-ledgers/
  • Official GitHub Action (action.yml):
    yaml
    - name: CTXFW SWE-Gate & FinOps PR Audit  uses: heuristicolab/ctxfw@v4  with:    license-key: ${{ secrets.CTXFW_LICENSE_KEY }}    diff-range: "origin/main...HEAD"

Control Plane, 10K Bundle ($490) & Team Squad Licensing: https://ctxfw.heuristicolab.com/pricing/?utm_source=github_readme#bundle-10k


ENGINEERED BY HEURISTICO LAB
HIGH-ASSURANCE SYSTEMS GROUP

来源:README.md,提交 25bfbc1

工具

5

prune_file

Extract semantic interfaces, types, pydantic models, sanitized raises, and signatures from a source file (`path`) at a given pruning `depth` ('full', 'interface', or 'nominal') and `language`, optionally stripping docstrings (`strip_docs`), while replacing procedural bodies with AST stubs. Use this when you only need to inspect contracts or APIs of an individual dependency without ingesting raw implementation code. For multi-module dependency graphs, use `resolve_context_bundle` instead. Does not modify files on disk (pure in-memory AST operation).

输入参数path必填depthlanguagestrip_docs

resolve_context_bundle

Calculate topological dependency graph distances (D0 full `target_file`, D1 interface stubs, D2 nominal symbols) within `project_root` and compile a token-pruned Markdown context bundle, with optional reactive degradation via `breaker_state` and `session_id`. Use this as your primary context builder before editing a file in a multi-module project. For inspecting isolated files, use `prune_file` instead. Read-only operation.

输入参数session_idtarget_file必填project_rootbreaker_state

evaluate_spec_axioms

Evaluate an architectural specification brief (`brief_text`) against formal determinism rules, negative invariant floors ('never'/'shall never'), and the Axiom Completeness Index (ACI 1.0000). Use this during intake or planning phases before writing code. For verifying unified git diff patches, use `evaluate_patch` instead. Pure read-only analytical evaluation with no side effects.

输入参数brief_text必填

evaluate_patch

Verify a unified git diff patch (`diff_text`) against SWE-Gate architectural constraints (`max_cyclomatic_delta`, `forbid_type_ignores`, `disallowed_import_modules`) and functional test results (`tests_passed`, `tests_failed`, `functional_verdict`) before allowing merge. Appends immutable audit records (`EVL-...`) in SweGateStore and seals cryptographic blocks in TraceKitStore; use `query_audit_ledger` to retrieve or verify persisted records.

输入参数pr_idrepo_iddiff_text必填repo_namecommit_shaauthor_kindtests_failedtests_passeddiff_size_bytesfunctional_verdictforbid_type_ignoresmax_cyclomatic_delta另有 1 个

query_audit_ledger

Retrieve persisted SWE-Gate patch evaluation records and violation findings by `evaluation_id` (`EVL-...`), or verify and inspect cryptographic SHA-256 hash-chained audit sessions in TraceKitStore by `session_id` (`SES-...`) with optional block listing (`include_blocks`, `max_blocks`). Use this for forensic inspection and compliance verification after running `evaluate_patch` or context tools. Pure read-only query with zero ledger mutations.

输入参数max_blockssession_idevaluation_idinclude_blocks

版本历史

1
  1. v4.1.1最新Oct 26, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分