New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@sofagent/rules

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sofagent/rules

sofagent 规则模块——从 audit 抽出,零 git 依赖,供编排模块 tool call 事前拦截;v1.3.9 起含官方 AST 规则引擎(sofagent-ruleset-ast,经临时文件驱动 TS 编译器,无仓库 fs 依赖)

npmnpm
Version
1.5.1
Version published
Weekly downloads
109
-88.69%
Maintainers
1
Weekly downloads
 
Created
Source

@sofagent/rules

sofagent 规则引擎纯函数包——从 audit 包抽出,零 fs/git 依赖,供编排模块 tool call 事前拦截。

安装

npm install @sofagent/rules

库包(无 CLI),随编排模块引用。Node.js 18+。

API

  • RulesEngine — 规则引擎类,接受规则集 + tool call context,返回拦截裁决
  • defaultToolRules — 默认规则集
  • InterceptVerdict / ToolCallContext / ToolRule — 核心类型定义

文档

  • 架构总览 — rules 在约束层中的位置
  • 使用手册(WIKI) — 面向 FDE 的完整用法

Keywords

rules-engine

FAQs

Package last updated on 22 Sep 2026

Related posts