@ratifia/mcp 0.10.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -205,7 +205,7 @@ Three properties worth knowing, because they shape how you should use it:
205
205
 
206
206
  1. The agent calls `request_decision` before a consequential/irreversible step (deploy, delete, spend, send externally), an ambiguous call it shouldn't guess, or to get a human to pick/refine something.
207
207
  2. Ratifia notifies the human (even away from keyboard) per the org's routing.
208
- 3. The agent `await_decision`s (or polls `check_decision`) — read `verdict`/`note`, plus `response_value` (select/text) or `output` (a refined draft).
208
+ 3. The agent `await_decision`s (or polls `check_decision`) — read `verdict`/`note`, plus `response_value` (select/text) or `output` (a refined draft). `policy_version` / `policy_version_id` say which version of the policy the decision ran under (null when no policy applied).
209
209
  4. The agent proceeds only on `approved`; on `rejected`/`expired` it adapts.
210
210
 
211
211
  Learn more at [ratifia.com](https://ratifia.com).
package/dist/index.js CHANGED
@@ -188,6 +188,10 @@ const formatDecision = (d) => ({
188
188
  ...(d.output ? { output: d.output, refined: Boolean(d.refinedOutput) } : {}),
189
189
  decided_by: d.decidedBy,
190
190
  decided_at: d.decidedAt,
191
+ // FN-316: which version of the policy governed this decision, so an agent can
192
+ // cite it ("approved under refunds v3"). Stays put when the policy is edited.
193
+ policy_version: d.policyVersion ?? null,
194
+ policy_version_id: d.policyVersionId ?? null,
191
195
  });
192
196
  const asToolResult = (payload) => ({
193
197
  content: [{ type: 'text', text: JSON.stringify(payload, null, 2) }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ratifia/mcp",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "description": "Ratifia MCP server — let an AI agent request a human decision/approval (HITL) mid-task and resume once it's answered. The agent becomes a Ratifia 'engine'.",
6
6
  "keywords": [