|
3 | 3 | **Status**: Accepted — implemented (2026-06-04) |
4 | 4 | **Authors**: HotCRM (objectstack-ai/hotcrm) — surfaced the requirement; design finalised in framework |
5 | 5 | **Consumers**: `@objectstack/service-ai` (the bridge), `@objectstack/spec` (ui.action, contracts.ai-service), every app that ships actions |
| 6 | +**Amended** (2026-11-15, [#33689](https://github.com/objectstack-ai/objectstack/issues/33689)): a dated note under [Confirmation](#confirmation-hitl-approval-queue) records who confirms a declared-gated action on an AI door. The status line above is left as it is. |
6 | 7 |
|
7 | 8 | --- |
8 | 9 |
|
@@ -234,6 +235,44 @@ asking; an action the user can't invoke simply isn't offered. |
234 | 235 | | `ai.requiresConfirmation: false` on a destructive action | exposed & direct-run — **author asserts safe** (bridge logs a warning) | |
235 | 236 | | not destructive | direct-run | |
236 | 237 |
|
| 238 | +> **Amendment note (2026-11-15, [#33689](https://github.com/objectstack-ai/objectstack/issues/33689) — PR #33725, `1e65a389`): who confirms a declared-gated action on an AI door.** |
| 239 | +> Ruled by the account owner on objectstack-ai/cloud#3826 (「3826 照建议(征询版)」, phase 1, card 1 of its |
| 240 | +> item-6 chain) and amended on #33689 (「我开始重新接受你说的主流方案,就是推送到客户的手机端」, |
| 241 | +> 「比如最简单的我可以先推送到邮件」). The contract is the docblock of |
| 242 | +> `packages/spec/src/contracts/ai-service.ts#AI_ACTION_CONFIRMATION_CAPABILITY`; it is the record, and this note |
| 243 | +> points at it without restating every case. |
| 244 | +> |
| 245 | +> - **Why.** On the MCP doors the confirmation of an action declaring `ai.requiresConfirmation: true` was the |
| 246 | +> caller's own `confirm: true`, which nothing could check. Measured on published 18.4.0, an agent sent it itself on |
| 247 | +> an irreversible action in 2 of 6 runs. The gate made forgetting loud; it did not prove a person. |
| 248 | +> - **Which calls.** An action whose author declared `ai.requiresConfirmation: true` (the declared flag, not the |
| 249 | +> destructive heuristic of the table above), called through the MCP `run_action` tool, or through `resume_run` for |
| 250 | +> the candidate action it would run, by any caller acting for a person, on an OAuth token or an API key. |
| 251 | +> - **How the person is asked, in order, after every admission gate and before anything runs.** (1) **Elicit**: one |
| 252 | +> MCP `elicitation/create` in form mode, when the client advertised `elicitation` at `initialize` and the door can |
| 253 | +> carry the request. (2) **Hand off**, otherwise: the call goes to the host's pending-confirmation service |
| 254 | +> (`packages/spec/src/contracts/ai-service.ts#IActionConfirmationService`, registered under |
| 255 | +> `packages/spec/src/contracts/ai-service.ts#ACTION_CONFIRMATION_SERVICE`) and the caller is answered |
| 256 | +> `status: 'pending_confirmation'` with a pending id. Only the person the call ran as approves or rejects it in the |
| 257 | +> app; an approved action runs as that person with every gate and permission re-checked, and a handed-off |
| 258 | +> `resume_run` resumes its parked run rather than starting one. The approve and reject doors take a person's |
| 259 | +> signed-in session to the app and nothing else. (3) **Refuse** only when the host registers no such service: |
| 260 | +> `428 ACTION_CONFIRMATION_REQUIRED` with `details.reason: 'no_confirmation_service'`. |
| 261 | +> - **The caller's `confirm` never counts** on such a call, in any of the three steps. |
| 262 | +> - **What an answer proves.** An elicited `accept` proves that the client answered, and an approved hand-off that a |
| 263 | +> signed-in session to the app answered. Neither proves a human; each is as strong as what it takes to give it. |
| 264 | +> - **Bounds.** The MCP `delete_record` and `delete_records` gates keep reading `confirm: true` until a decision moves |
| 265 | +> them, and REST `/actions` stays outside the gate for a person. **The in-app assistant door is OPEN**: the |
| 266 | +> bridge and approval queue this ADR describes in [Invocation flow](#4-invocation-flow) and the table above are not |
| 267 | +> named by the contract, which is silent on them until the maintainer decides (question 1 on #33689). |
| 268 | +> - **When it binds.** The contract ships in `@objectstack/spec/contracts` from the release that carries `1e65a389`. |
| 269 | +> The doors implement it in the next card of the chain. Until that change ships, every door gates on the member as |
| 270 | +> before (`packages/runtime/src/action-execution.ts#actionConfirmationRefusal`), and the addendum's sentence below |
| 271 | +> that a C action is refused "until the call carries `confirm: true`" stays the description of the running code. |
| 272 | +> - **Unchanged.** The opt-in and its default-off exposure; the addendum's H, C and E buckets and its rule that a C |
| 273 | +> action's confirmation is never relaxed (what changes is who confirms it, not whether it is asked); and the AI |
| 274 | +> service account's refusal, ADR-0151 D3 rule 3, which its own note of the same date records. |
| 275 | +
|
237 | 276 | --- |
238 | 277 |
|
239 | 278 | ## Migration Path |
|
0 commit comments