Co-Pilot / 辅助式
更新于 24 days ago

interlock

CCULPRITCHAOS
0.0k
culpritchaos/interlock
80
Agent 评分

💡 摘要

Interlock是一个用于AI基础设施的断路器,确保质量并提供取证日志。

🎯 适合人群

AI开发者数据科学家DevOps工程师质量保证团队AI基础设施管理者

🤖 AI 吐槽:看起来很能打,但别让配置把人劝退。

安全分析中风险

风险:Medium。建议检查:是否执行 shell/命令行指令;是否发起外网请求(SSRF/数据外发);文件读写范围与路径穿越风险。以最小权限运行,并在生产环境启用前审计代码与依赖。

Interlock logo

INTERLOCK

Interlock is a circuit-breaker + evidence layer for AI infrastructure. It monitors runtime signals (confidence/latency/failure), refuses or degrades when the system is outside safe bounds, and writes verifiable forensic logs.

What it does

  • Quality gating: refuse/degrade low-certainty responses
  • Survivability: shed load and recover cleanly under stress
  • Evidence: cryptographic provenance for interventions + configs
  • Adapters: integration points for vector DBs and local models

Quickstart

Docs: Quickstart · Local AI · Middleware

Express (Node)

import { interlockExpress } from '@interlock/express'; app.use(interlockExpress({ quality_floor: 0.8 }));

FastAPI (Python)

from interlock_fastapi.middleware import InterlockMiddleware app.add_middleware(InterlockMiddleware, interlock_url="http://brain:3000")

Supported Integrations

| Integration | Status | |-------------|--------| | Pinecone | ✅ Production | | FAISS | ✅ Production | | LangChain | ✅ Production | | LlamaIndex | ✅ Production | | Weaviate | ✅ Stable | | Milvus | ✅ Stable | | Ollama / Local AI | ✅ Tested |

Evidence & Validation

CI workflows produce repeatable artifacts (stress, scale, adapter certification).

See: Test Results · Live Incidents

OperatorPack Receipt Verification

Interlock includes tools to verify and index OperatorPack receipts (JSON).

Usage

  1. Verify a receipt:

    python tools/verify_operatorpack.py "C:\path\to\operatorpack.json"

    Outputs a JSON verdict (PASS/WARN/FAIL) based on performance and quality thresholds.

  2. Index a receipt:

    python tools/append_receipt_index.py "C:\path\to\operatorpack.json" "receipts/RECEIPTS_INDEX.md"

    Appends metrics to a Markdown table index file for long-term tracking.

Recommended Workflow

Place new receipts in receipts/inbox/ for verification before promotion.

Example using a sample receipt:

python tools/verify_operatorpack.py "receipts/examples/operatorpack_example_pass.json"

Receipt Workflow

Interlock supports a standard promotion workflow for OperatorPacks with 2-Tier Governance:

  1. Inbox: Copy new receipt JSON files into receipts/inbox/.

  2. Promote: Run the promotion script with the desired tier:

    • Production (Default): Strict gates ($N \ge 10,000$).
      pwsh -File tools/promote_receipt.ps1
      • Results land in receipts/approved/ or receipts/rejected/.
      • Primary index: RECEIPTS_INDEX.md.
    • Exploration: Faster iteration gates ($N \ge 2,000$).
      pwsh -File tools/promote_receipt.ps1 -Mode exploration
      • Results land in receipts/approved_experimental/ or receipts/rejected_experimental/.
      • Secondary index: RECEIPTS_INDEX_EXPERIMENTAL.md.
  3. Audit: Review the receipts/approved/ folder and RECEIPTS_INDEX.md (or the experimental equivalents) for historical data.

[!NOTE] Approved receipts and summaries are generated locally and are not committed to the repository to maintain data privacy.

Practical: What to do next

  1. Generate Evidence: Obtain a receipt JSON (OperatorPack) from a lab (e.g., TESLA) — keep it outside Interlock as the source of truth.
  2. Stage: Copy it into receipts/inbox/.
  3. Promote (Production):
    pwsh -File tools/promote_receipt.ps1
    Or specify a file: pwsh -File tools/promote_receipt.ps1 -Receipt "C:\path\to\receipt.json"
  4. Promote (Exploration):
    pwsh -File tools/promote_receipt.ps1 -Mode exploration
  5. Summarize:
    python tools/summarize_receipts.py
  6. Artifact Locations:
    • receipts/approved/ or receipts/approved_experimental/ (Local only)
    • receipts/rejected/ or receipts/rejected_experimental/ (Local only)
    • receipts/summary/ (Local only)

These outputs are local artifacts and are gitignored by design in this public repo.

AI Collaboration

This repo uses a multi-agent workflow with safety guardrails.

AI agents must run tools/precommit_safety_scan.ps1 before commits.

License

MIT. See LICENSE.

五维分析
清晰度8/10
创新性7/10
实用性9/10
完整性8/10
可维护性8/10
优缺点分析

优点

  • 提高AI响应质量
  • 为干预提供取证证据
  • 支持多种集成
  • 提高系统在压力下的弹性

缺点

  • 需要正确配置以确保有效性
  • 可能增加AI工作流程的复杂性
  • 依赖外部集成
  • 可能导致性能开销

相关技能

useful-ai-prompts

A
toolCo-Pilot / 辅助式
88/ 100

“一个提示的宝藏,但别指望它们为你写小说。”

mcpspy

A
toolCo-Pilot / 辅助式
86/ 100

“MCPSpy:因为谁不想窥探他们 AI 的秘密?”

fastmcp

A
toolCo-Pilot / 辅助式
86/ 100

“FastMCP:因为谁不喜欢在AI中添加一点复杂性呢?”

免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。

版权归原作者所有 CULPRITCHAOS.