PageSourceSearch

https://docs.mplp.io/assets/js/d2b038e8.d5064fe9.js

js mplp.io collected 2026-10-05 06:33:36 UTC 9,633 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkmplp_docs_site=globalThis.webpackChunkmplp_docs_site||[]).push([[2309],{6270(e,n,i){i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"guides/examples/risk-confirmation-flow","title":"Risk Confirmation Flow","description":"Example flow demonstrating human-in-the-loop confirmation for high-risk actions.","source":"@site/docs/guides/examples/risk-confirmation-flow.md","sourceDirName":"guides/examples","slug":"/guides/examples/risk-confirmation-flow","permalink":"/docs/guides/examples/risk-confirmation-flow","draft":false,"unlisted":false,"editUrl":"https://github.com/Coregentis/MPLP-Protocol/tree/main/docs/docs/guides/examples/risk-confirmation-flow.md","tags":[],"version":"current","lastUpdatedAt":1769141052000,"sidebarPosition":4,"frontMatter":{"sidebar_position":4,"doc_type":"reference","normativity":"informative","status":"active","authority":"Documentation Governance","description":"Example flow demonstrating human-in-the-loop confirmation for high-risk actions.","title":"Risk Confirmation Flow"},"sidebar":"docsSidebar","previous":{"title":"Tool Execution","permalink":"/docs/guides/examples/tool-execution-integration"},"next":{"title":"Error Recovery Flow","permalink":"/docs/guides/examples/error-recovery-flow"}}');var o=i(4848),r=i(8453);const s={sidebar_position:4,doc_type:"reference",normativity:"informative",status:"active",authority:"Documentation Governance",description:"Example flow demonstrating human-in-the-loop confirmation for high-risk actions.",title:"Risk Confirmation Flow"},l="Risk Confirmation Flow",c={},d=[{value:"1. Overview",id:"1-overview",level:2},{value:"Workflow Steps:",id:"workflow-steps",level:3},{value:"2. Normative Example",id:"2-normative-example",level:2},{value:"2.1 The Confirm Object (JSON)",id:"21-the-confirm-object-json",level:3},{value:"2.2 The Decision Record",id:"22-the-decision-record",level:3},{value:"3. State Transition Logic",id:"3-state-transition-logic",level:2},{value:"4. Implementation Details",id:"4-implementation-details",level:2},{value:"4.1 Blocking Mechanism",id:"41-blocking-mechanism",level:3},{value:"4.2 Evidence Chain",id:"42-evidence-chain",level:3},{value:"5. Related Documentation",id:"5-related-documentation",level:2}];function a(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"risk-confirmation-flow",children:"Risk Confirmation Flow"})}),"\n",(0,o.jsx)(n.h2,{id:"1-overview",children:"1. Overview"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Related Golden Flow"}),": ",(0,o.jsx)(n.code,{children:"flow-05-single-agent-confirm-required"})]}),"\n",(0,o.jsxs)(n.p,{children:["In autonomous agent systems, certain actions (e.g., financial transactions, data deletion, external API calls) carry high risk. MPLP uses the ",(0,o.jsx)(n.strong,{children:"Confirm Module"})," to gate these actions, requiring explicit approval from a designated role (human or authorized agent) before execution proceeds."]}),"\n",(0,o.jsx)(n.h3,{id:"workflow-steps",children:"Workflow Steps:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Identification"}),": The runtime identifies a high-risk step in the current ",(0,o.jsx)(n.code,{children:"Plan"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Request"}),": The runtime creates a ",(0,o.jsx)(n.code,{children:"Confirm"})," object with status ",(0,o.jsx)(n.code,{children:"pending"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Wait"}),": Execution of the high-risk step is blocked."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Decision"}),": An authorized role submits a ",(0,o.jsx)(n.code,{children:"Decision"})," (approved/rejected)."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Resume/Abort"}),": The runtime resumes execution or aborts the plan based on the decision."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"2-normative-example",children:"2. Normative Example"}),"\n",(0,o.jsx)(n.h3,{id:"21-the-confirm-object-json",children:"2.1 The Confirm Object (JSON)"}),"\n",(0,o.jsxs)(n.p,{children:['When an agent reaches a step requiring approval (e.g., "Execute Wire Transfer"), the following ',(0,o.jsx)(n.code,{children:"Confirm"})," object is emitted:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-json",children:'{\n  "meta": {\n    "protocolVersion": "1.0.0",\n    "source": "runtime-01"\
1n  },\n  "confirm_id": "conf-8829-x1",\n  "target_type": "plan",\n  "target_id": "plan-550-abc",\n  "status": "pending",\n  "requested_by_role": "executor-agent",\n  "requested_at": "2025-12-22T10:00:00Z",\n  "reason": "Step 3 requires financial authorization for amount > $1000.",\n  "trace": {\n    "trace_id": "trace-990-def",\n    "span_id": "span-step-3"\n  }\n}\n'})}),"\n",(0,o.jsx)(n.h3,{id:"22-the-decision-record",children:"2.2 The Decision Record"}),"\n",(0,o.jsxs)(n.p,{children:["Once the user approves the request via a governance shell or dashboard, a ",(0,o.jsx)(n.code,{children:"Decision"})," is appended:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-json",children:'{\n  "decisions": [\n    {\n      "decision_id": "dec-441-z9",\n      "status": "approved",\n      "decided_by_role": "finance-admin-human",\n      "decided_at": "2025-12-22T10:05:00Z",\n      "reason": "Verified transaction details with vendor."\n    }\n  ],\n  "status": "approved"\n}\n'})}),"\n",(0,o.jsx)(n.h2,{id:"3-state-transition-logic",children:"3. State Transition Logic"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{style:{textAlign:"left"},children:"Status"}),(0,o.jsx)(n.th,{style:{textAlign:"left"},children:"Runtime Action"}),(0,o.jsx)(n.th,{style:{textAlign:"left"},children:"Trace Event"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{style:{textAlign:"left"},children:(0,o.jsx)(n.code,{children:"pending"})}),(0,o.jsxs)(n.td,{style:{textAlign:"left"},children:[(0,o.jsx)(n.strong,{children:"BLOCK"})," execution of ",(0,o.jsx)(n.code,{children:"target_id"}),"."]}),(0,o.jsx)(n.td,{style:{textAlign:"left"},children:(0,o.jsx)(n.code,{children:"confirm.requested"})})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{style:{textAlign:"left"},children:(0,o.jsx)(n.code,{children:"approved"})}),(0,o.jsxs)(n.td,{style:{textAlign:"left"},children:[(0,o.jsx)(n.strong,{children:"RESUME"})," execution of ",(0,o.jsx)(n.code,{children:"target_id"}),"."]}),(0,o.jsx)(n.td,{style:{textAlign:"left"},children:(0,o.jsx)(n.code,{children:"confirm.approved"})})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{style:{textAlign:"left"},children:(0,o.jsx)(n.code,{children:"rejected"})}),(0,o.jsxs)(n.td,{style:{textAlign:"left"},children:[(0,o.jsx)(n.strong,{children:"ABORT"})," plan or trigger recovery."]}),(0,o.jsx)(n.td,{style:{textAlign:"left"},children:(0,o.jsx)(n.code,{children:"confirm.rejected"})})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{style:{textAlign:"left"},children:(0,o.jsx)(n.code,{children:"cancelled"})}),(0,o.jsxs)(n.td,{style:{textAlign:"left"},children:[(0,o.jsx)(n.strong,{children:"CLEANUP"})," and exit."]}),(0,o.jsx)(n.td,{style:{textAlign:"left"},children:(0,o.jsx)(n.code,{children:"confirm.cancelled"})})]})]})]}),"\n",(0,o.jsx)(n.h2,{id:"4-implementation-details",children:"4. Implementation Details"}),"\n",(0,o.jsx)(n.h3,{id:"41-blocking-mechanism",children:"4.1 Blocking Mechanism"}),"\n",(0,o.jsxs)(n.p,{children:['A conformant MPLP runtime must implement a "Gatekeeper" duty that checks for active ',(0,o.jsx)(n.code,{children:"pending"})," Confirm objects associated with the current ",(0,o.jsx)(n.code,{children:"plan_id"})," and ",(0,o.jsx)(n.code,{children:"step_id"})," before invoking any tool or action."]}),"\n",(0,o.jsx)(n.h3,{id:"42-evidence-chain",children:"4.2 Evidence Chain"}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"Confirm"})," object is cryptographically linked to the ",(0,o.jsx)(n.code,{children:"Trace"})," via the ",(0,o.jsx)(n.code,{children:"trace_id"}),". This ensures that every high-risk action in the audit log is accompanied by a valid approval record."]}),"\n",(0,o.jsx)(n.h2,{id:"5-related-documentation",children:"5. Related Documentation"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/specification/modules/confirm-module",children:"Confirm Module Specification"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/specification/architecture",children:"L3 Execution Loop"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/docs/evaluation/golden-flows",children:"Golden Flow: HITL Patterns"})}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},8453(e,n,i){i.d(n,{R:()=>s,x:()=>l});var t=i(6540);const o={},r=t.createContext(o);function s(e){const n=t.useContext(r);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.