跳到主要内容
    ↑↓ 选择↵ 打开esc 关闭
    中文English
    gendigitalinc

    Sage Opencode

    v0.12.0其他
    @gendigital/sage-opencode

    Safety for Agents - ADR layer for OpenCode

    GitHub 星标

    265

    近 30 天 +3

    月装机量

    189

    近 7 天 144

    综合评分SCORE

    56.9

    生态多维模型

    最近提交

    7 天前

    2026-08-13

    快速安装与配置

    opencode.json

    写入当前项目的 opencode.json,只对这个仓库生效。

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["@gendigital/sage-opencode@0.12.0"]
    }

    opencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。

    Sage

    Safety for Agents — Agent Detection & Response for AI coding assistants


    Sage blocking a dangerous command in Claude Code

    Sage is a lightweight security layer that protects AI agents from executing dangerous actions. It intercepts tool calls — shell commands, URL fetches, file writes — and checks them against multiple threat detection layers before they run.

    Note: Sage may appear under a different product name (e.g., Norton Sage, Avast Sage) depending on how it was installed. See Branding for details.

    Key Features

    • URL reputation — cloud-based detection of malware, phishing, and scam URLs
    • Local heuristics — 300+ YAML-based threat patterns for dangerous commands, suspicious URLs, credential exposure, and obfuscation
    • Prompt injection detection — two-tier defense (heuristics + fine-tuned ML model) against injected instructions in fetched content. See Prompt Injection
    • Package supply-chain checks — registry existence, file reputation, and age analysis for npm/PyPI packages
    • Plugin scanning — scans installed plugins for threats at session start
    • AMSI integration — Windows Antimalware Scan Interface support (Windows + WSL via PowerShell interop; no-op on macOS and non-WSL Linux)

    Quick Start

    Visit ai.gendigital.com/sage for the latest installation instructions, or use the platform-specific guides below.

    Claude Codeinstall guide · requires Node.js >= 18

    /plugin marketplace add https://github.com/gendigitalinc/sage.git
    /plugin install sage@sage
    

    Cursorinstall guide · install the Gen Sage extension from the marketplace

    VS Codeinstall guide · install the Gen Sage extension from the marketplace

    OpenClawinstall guide · install from npm

    openclaw plugins install @gendigital/sage-openclaw
    

    OpenCode — install from npm by adding to ~/.config/opencode/opencode.json:

    {
      "plugin": ["@gendigital/sage-opencode"]
    }
    

    See the User Guide for detailed instructions, configuration, and troubleshooting.

    Privacy

    For privacy considerations, please refer to Privacy.

    Documentation

    Document Description
    User Guide Installation, usage, configuration, exceptions, platform guides, privacy, FAQ
    Developer Guide Architecture, development setup, testing, threat rule format
    Prompt Injection ML + heuristic prompt injection detection
    Package Protection npm/PyPI supply-chain checks
    AMSI Scanning Windows antimalware scanning via AMSI
    Plugin Scanning Session-start plugin scanning
    Audit Log On-disk JSONL schema (entries, signals, content)
    MCP Server Shared MCP server architecture
    Decision Pipeline Signal sources, policy model, evaluation order
    Branding Product name configuration

    Contributing

    See CONTRIBUTING.md for development setup, coding conventions, and the threat rule contribution process.

    License

    Copyright 2026 Gen Digital Inc.