@ai-agent-forge/plugin-decision-escalation

中文文档
0.88.28发布于 2026/11/02MITTypeScriptES Module近 30 天下载 2560

Decision escalation capability plugin for Agent Forge (formal fork-decision ask with a local confirmation page, timeout de-escalation to an independent adjudication chain, and an irreversible redline)

原始使用文档
文档目录5 节
  1. Levels (设计 §3)
  2. Tools
  3. Timeout de-escalation (设计 §5)
  4. Persistence protocol
  5. Notes

@agent-forge/plugin-decision-escalation

Decision escalation capability plugin for Agent Forge: a formal ask channel for forks — the model asks with decision_ask, the user answers on a local confirmation page or in TUI text, and an unattended fork never stalls forever: reversible levels are adjudicated by an independent subagent chain on timeout, irreversible ones stay stopped.

  • Design contract (authoritative): docs/design/决策升级插件设计.md
  • Position: a decision channel alongside the goal/plan/todo layers; the main agent keeps L0 (trivial fork) autonomy — this plugin only takes over when a fork is worth a formal ask.

Levels (设计 §3)

LevelVerdictOn timeout
L0reversible, local impactnot this plugin's business
L1 (routine)reversible, single moduleone independent adjudicator agent
L2 (significant)reversible but directionalone advocate per reversible option + independent judge
L3 (redline)any option reversibility: "irreversible" or field missingnever adjudicated — stays stopped, fork written back to the user

The redline is engine-derived from per-option reversibility, never the model's risk self-assessment; risk_class only picks L1 vs L2 handling.

Tools

ToolPurpose
decision_askAsk a fork (2..4 closed options + symmetric context_digest brief + risk_class). Returns decisionId, page URL, timeoutMs, riskClass, redLine immediately; non-blocking.
decision_resolveBook the answer: source: "user" (page or TUI text) or source: "adjudication" — the latter only when an injected verdict exists and matches; fabricating one is rejected.

Command: /decision log [N] · /decision show <id> · /decision cancel <id>.

Timeout de-escalation (设计 §5)

Factory default 180s (config.timeoutMs overrides). On timeout without a user answer: redline forks inject a decision.notice halted notice; L1/L2 forks dispatch the adjudication chain through the public agent-forge.agent-task-scheduler@1 capability (subagent-delegate), readonly profile with read/grep/ls/find only. Every chain failure — capability missing, submit/drain error, subagent not succeeded, output violating the {"choice","confidence","rationale","keyEvidence"} JSON protocol — lands as adjudication.unavailable / adjudication.unparseable and the same halted behavior: stop, no retry, no silent downgrade.

Persistence protocol

Structurally identical to the goal/plan/alignment plugins: append-only decision.state full snapshots plus one decision.transition audit entry per conversion (asked | answered.user | answered.adjudication | timed-out.halted | timed-out.adjudicating | adjudication.unavailable | adjudication.unparseable | cancelled), announced as decision.changed. The full adjudication verdict rides the decision.state snapshot for /decision show. User answers inject as decision.answered (display: false, model context); notices inject as decision.notice (display: true, user visible).

Notes

  • Requires a host session that exposes SessionAPI.sendMessage (answer and notice injection); without it decision_ask fails fast and the rest of the surface stays usable.
  • The confirmation page is one of two answer channels for a present user; unattended sessions never depend on it.
  • Deterministic tests only (fake CapabilityAPI + fake scheduler handle + real node:http on an OS-assigned port); no real model calls. Adjudication quality is a model quality attribute and deliberately untested (设计 §9).

版本与发布记录

@ai-agent-forge/plugin-decision-escalation 共发布 15 个版本,首次发布于 2026/10/25;过去 12 个月发布了 15 个版本。

版本发布日期距今
0.88.28latest2026/11/025 天前
0.88.272026/11/016 天前
0.88.262026/11/016 天前
0.88.252026/10/317 天前
0.88.242026/10/308 天前
0.88.232026/10/308 天前

关于 @ai-agent-forge/plugin-decision-escalation 的常见问题

@ai-agent-forge/plugin-decision-escalation 是什么?

Decision escalation capability plugin for Agent Forge (formal fork-decision ask with a local confirmation page, timeout de-escalation to an independent adjudication chain, and an irreversible redline)

如何安装 @ai-agent-forge/plugin-decision-escalation?

在项目目录运行 npm install @ai-agent-forge/plugin-decision-escalation,或使用 pnpm add / yarn add / bun add。

@ai-agent-forge/plugin-decision-escalation 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@ai-agent-forge/plugin-decision-escalation 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@ai-agent-forge/plugin-decision-escalation 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.19.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@ai-agent-forge/plugin-decision-escalation 可以商用吗?

@ai-agent-forge/plugin-decision-escalation 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@ai-agent-forge/plugin-decision-escalation 的下载量有多少?

根据 npm 官方下载统计,@ai-agent-forge/plugin-decision-escalation 在 2026/10/05 – 2026/11/03 这 30 天内被下载 2,560 次,日均约 85 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ai-agent-forge/plugin-decision-escalation 还在维护吗?

最新版本 0.88.28 发布于 2026/11/02(5 天前);至今共发布 15 个版本,其中过去 12 个月发布了 15 个;首次发布于 2026/10/25。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。