consensus-send-email-guard
INLINECODE0 is a production-style outbound communication guardrail.
What this skill does
- - evaluates an email draft with a persona panel
- aggregates votes by reputation (weighted approval policy)
- enforces hard-block categories (sensitive data, legal/medical certainty, disallowed guarantees)
- returns final decision: INLINECODE1
- writes
decision artifacts to board state
Why this matters
Email is high-impact and irreversible once sent. This skill reduces hallucinated promises and policy-violating claims before external side effects occur.
Ecosystem role
Stack position:
INLINECODE3
It converts raw generation into governed action with auditability.
Governance and learning
- - strict JSON contracts for automation pipelines
- idempotent retries to prevent duplicate reputation mutation
- reputation updates calibrate evaluator influence over time
Use cases
- - customer-facing outbound messaging
- partner/legal-sensitive communications
- automated campaign quality gates
Runtime, credentials, and network behavior
- - runtime binaries:
node, INLINECODE5 - network calls: none in guard decision logic
- environment config read by this package:
CONSENSUS_STATE_FILE, INLINECODE7 - filesystem writes: board/state artifacts under the configured consensus state path
Dependency trust model
- -
consensus-guard-core is the first-party consensus package used in guard execution - versions are semver-pinned in
package.json for reproducible installs - this skill does not request host-wide privileges and does not mutate other skills
Install
CODEBLOCK0
Quick start
CODEBLOCK1
Tool-call integration
This skill is wired to the consensus-interact contract boundary (via shared consensus-guard-core wrappers where applicable):
- - readBoardPolicy
- getLatestPersonaSet / getPersonaSet
- writeArtifact / writeDecision
- idempotent decision lookup
This keeps board orchestration standardized across skills.
Invoke Contract
This skill exposes a canonical entrypoint:
INLINECODE11 starts the guard flow and executes deterministic policy evaluation with board operations via shared guard-core wrappers.
external_agent mode
Guards support two modes:
- -
mode="external_agent": caller supplies external_votes[] from agents/humans/models for deterministic aggregation. - INLINECODE14 : requires an existing
persona_set_id; guard will not generate persona sets internally.
consensus-send-email-guard
consensus-send-email-guard 是一个生产级的外发通信护栏。
该技能的功能
- - 通过角色面板评估邮件草稿
- 按声誉聚合投票(加权批准策略)
- 强制执行硬阻断类别(敏感数据、法律/医疗确定性、禁止性保证)
- 返回最终决策:APPROVE | BLOCK | REWRITE
- 将decision工件写入板状态
为何重要
邮件一旦发送影响巨大且不可撤销。该技能在产生外部影响之前,减少幻觉承诺和违反政策的声明。
生态系统角色
堆栈位置:
consensus-tools -> consensus-interact pattern -> persona_set -> send-email-guard
它将原始生成转化为可审计的受控操作。
治理与学习
- - 自动化管道的严格JSON合约
- 幂等重试以防止重复的声誉变更
- 声誉更新随时间校准评估者的影响力
使用场景
- - 面向客户的外发消息
- 合作伙伴/法律敏感通信
- 自动化活动质量门控
运行时、凭证和网络行为
- - 运行时二进制文件:node、tsx
- 网络调用:护栏决策逻辑中无网络调用
- 此包读取的环境配置:CONSENSUSSTATEFILE、CONSENSUSSTATEROOT
- 文件系统写入:配置的共识状态路径下的板/状态工件
依赖信任模型
- - consensus-guard-core 是护栏执行中使用的一方共识包
- 版本在package.json中使用semver锁定以实现可重现安装
- 该技能不请求主机级权限,也不修改其他技能
安装
bash
npm i consensus-send-email-guard
快速开始
bash
node --import tsx run.js --input ./examples/email-input.json
工具调用集成
该技能连接到共识交互合约边界(通过共享的consensus-guard-core包装器,在适用情况下):
- - readBoardPolicy
- getLatestPersonaSet / getPersonaSet
- writeArtifact / writeDecision
- 幂等决策查找
这使板编排在各技能之间保持标准化。
调用合约
该技能暴露一个规范入口点:
- - invoke(input, opts?) -> Promise
invoke() 启动护栏流程,并通过共享的guard-core包装器执行带有板操作的确定性策略评估。
external_agent模式
护栏支持两种模式:
- - mode=externalagent:调用者提供来自代理/人类/模型的externalvotes[]用于确定性聚合。
- mode=persona:需要现有的personasetid;护栏不会在内部生成角色集。