@ratifia/mcp 0.13.0 → 0.13.1
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 +3 -3
- package/dist/server.js +5 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -132,11 +132,11 @@ request_decision(
|
|
|
132
132
|
)
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
###
|
|
135
|
+
### Propose a draft, get it refined
|
|
136
136
|
|
|
137
137
|
Pass `proposed_output` to attach an **editable draft** (e.g. an email you want to
|
|
138
|
-
send). The human
|
|
139
|
-
|
|
138
|
+
send). The human can edit it in the Ratifia app (Slack can only approve or reject
|
|
139
|
+
it), and you get **their** final version back:
|
|
140
140
|
|
|
141
141
|
```
|
|
142
142
|
request_decision(
|
package/dist/server.js
CHANGED
|
@@ -15,8 +15,9 @@ const formatDecision = (d) => ({
|
|
|
15
15
|
...(d.responseSpec ? { response_spec: d.responseSpec } : {}),
|
|
16
16
|
...(d.responseValue ? { response_value: d.responseValue } : {}),
|
|
17
17
|
// FN-185: if you sent a proposed_output (e.g. a draft email), the human may
|
|
18
|
-
// have
|
|
19
|
-
// effective final text to act on — use it over your
|
|
18
|
+
// have edited it in the Ratifia app (Slack can only approve or reject it).
|
|
19
|
+
// `output.content` is the effective final text to act on — use it over your
|
|
20
|
+
// original draft.
|
|
20
21
|
...(d.output ? { output: d.output, refined: Boolean(d.refinedOutput) } : {}),
|
|
21
22
|
decided_by: d.decidedBy,
|
|
22
23
|
decided_at: d.decidedAt,
|
|
@@ -102,7 +103,7 @@ export function createRatifiaServer(cfg, opts) {
|
|
|
102
103
|
'2. It returns a decision_id (+ url). The human is notified and may be away from their keyboard, so a verdict can take a while. (If the org policy auto-resolved that no approval was needed, it returns approval_required=false — just proceed.)',
|
|
103
104
|
'3. Wait for the verdict: prefer await_decision (it blocks until answered) over polling check_decision in a loop. Either way, "approved"/"rejected" comes with a note — the note is the human\'s actual answer/input, so read and follow it. If you asked for a choice/typed value (response_type select/text), the answer is in response_value (selected option ids — map them back via response_spec.options — or text), not just the note.',
|
|
104
105
|
'4. Do NOT perform the gated action until it resolves approved. On rejected or expired, do not proceed — adapt or ask again.',
|
|
105
|
-
'Refining content: to have a human review/edit a draft (e.g. an email you want to send), pass proposed_output.content. They can
|
|
106
|
+
'Refining content: to have a human review/edit a draft (e.g. an email you want to send), pass proposed_output.content. They can edit it in the Ratifia app (Slack can only approve or reject it); once approved, use output.content as the final text — it may differ from what you sent.',
|
|
106
107
|
'Evidence: if your ask rests on material the human should see — a Slack conversation, an email, a policy excerpt — attach it (the `evidence` array on request_decision, or attach_evidence afterwards). Send the text, not just a link: the snapshot is what the audit trail keeps, and a link can change. Evidence can only be attached while the decision is pending; once it resolves the set is sealed, so attach before you await.',
|
|
107
108
|
'Prefer one well-scoped decision with rich context over many small ones.',
|
|
108
109
|
].join('\n'),
|
|
@@ -144,7 +145,7 @@ export function createRatifiaServer(cfg, opts) {
|
|
|
144
145
|
content: z.string().describe('The draft the human can edit before approving (e.g. the email text).'),
|
|
145
146
|
})
|
|
146
147
|
.optional()
|
|
147
|
-
.describe('A draft artifact the human can refine before approving — e.g. an email you propose to send. They can edit it
|
|
148
|
+
.describe('A draft artifact the human can refine before approving — e.g. an email you propose to send. They can edit it in the Ratifia app (Slack can only approve or reject it); on approval the final text comes back in `output.content`. Use this when you want a human to review/refine content, not just say yes/no.'),
|
|
148
149
|
tool_name: z
|
|
149
150
|
.string()
|
|
150
151
|
.optional()
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ratifia/mcp",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Ratifia MCP server
|
|
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": [
|
|
7
7
|
"mcp",
|
|
8
8
|
"model-context-protocol",
|