<mxfile host="app.diagrams.net">
  <diagram id="hooks" name="Page-1">
    <mxGraphModel dx="1400" dy="700" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1200" pageHeight="560" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="t" value="Harness lifecycle hooks. AWS sample, not a FactualMinds policy." style="text;html=1;fontSize=16;fontStyle=1;align=left;fontFamily=Helvetica;" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="760" height="28" as="geometry"/>
        </mxCell>
        <mxCell id="a" value="before_invocation&#10;Lambda deny stops the call" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#232F3E;fontColor=#ffffff;fontFamily=Helvetica;fontSize=12;" vertex="1" parent="1">
          <mxGeometry x="40" y="90" width="180" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="b" value="Model proposes&#10;a tool call" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#01A88D;fontColor=#ffffff;fontFamily=Helvetica;fontSize=12;" vertex="1" parent="1">
          <mxGeometry x="270" y="90" width="160" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="c" value="before_tool_call&#10;deny skips the tool&#10;loop continues" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FF9900;fontColor=#232F3E;fontFamily=Helvetica;fontSize=12;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="480" y="80" width="180" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="d" value="Tool runs" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#007CBD;fontColor=#ffffff;fontFamily=Helvetica;fontSize=12;" vertex="1" parent="1">
          <mxGeometry x="710" y="90" width="120" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="e" value="after_tool_call&#10;deny keeps the result&#10;and stops" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D13212;fontColor=#ffffff;fontFamily=Helvetica;fontSize=12;" vertex="1" parent="1">
          <mxGeometry x="880" y="80" width="180" height="100" as="geometry"/>
        </mxCell>
        <mxCell id="f" value="after_invocation&#10;SNS or EventBridge notify.&#10;Streamed text cannot be retracted." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F2F3F3;strokeColor=#545B64;fontFamily=Helvetica;fontSize=12;" vertex="1" parent="1">
          <mxGeometry x="480" y="250" width="320" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="ab" style="endArrow=block;html=1;strokeWidth=2;" edge="1" parent="1" source="a" target="b"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="bc" style="endArrow=block;html=1;strokeWidth=2;" edge="1" parent="1" source="b" target="c"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="cd" style="endArrow=block;html=1;strokeWidth=2;" edge="1" parent="1" source="c" target="d"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="de" style="endArrow=block;html=1;strokeWidth=2;" edge="1" parent="1" source="d" target="e"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="ef" style="endArrow=block;html=1;strokeWidth=2;dashed=1;" edge="1" parent="1" source="e" target="f"><mxGeometry relative="1" as="geometry"/></mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
