Human-in-the-loop purchase-completion agent (standalone plugin + checkout skill)#55
Draft
juniperbevensee wants to merge 2 commits into
Draft
Human-in-the-loop purchase-completion agent (standalone plugin + checkout skill)#55juniperbevensee wants to merge 2 commits into
juniperbevensee wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Experimental human-in-the-loop purchasing capability, shipped as a standalone, opt-in HSM artifact — zero hermes-agent image footprint, zero fork divergence.
infra/templates/plugins/human_escalation/— registersescalate_to_human+check_pending_escalationtools and apre_gateway_dispatchresume hook. The escalation bus over chat: relay an SMS/2FA code, confirm a charge, hand off a VNC/QR/link — all as chat messages, replies resolved on the next turn.infra/templates/skills/checkout/SKILL.md— reusable, resume-aware checkout playbook with an always-confirm-the-charge gate. Moshtix is instance feat: surfaces P0 — restart, disconnect, edit, pairing visibility #1.image-vs-hsm-boundary.mdupdated with the default-bundle-vs-optional-artifact distinction, this worked example, and a skill-packaging caveat (file skill vsregister_skill).Design (Approach A′ — no-patch async)
Uses only existing extension points (tool registration, the
pre_gateway_dispatchhook contract, thesend_messagetool, session env). The escalation posts to chat and returns (turn ends); the user's reply is a normal inbound message that the hook rewrites to nudge the resume-aware skill, which continues from the live (persistent) Camofox browser tab. No gateway/agent source patched.Tests
24 co-located unit/integration tests pass (store / escalate / hook / full resume cycle). Standalone-load proven via a loader replica with no
pluginsparent package onsys.path.Test Plan — manual E2E on a real agent (gates merge-to-default; spends real money at the end)
plugins.enabled+=human_escalation; install thecheckoutskill). Confirm tools register at boot.escalate_to_humanfor a code → it posts + ends turn → reply → it resumes viacheck_pending_escalation. (Validates agent reliably re-enters on a bare reply.)platform:chat_id) and theMEDIA:attachment path for a QR/VNClink_handoff.Residual real-runtime risks (validate in E2E, not blockers)
Signal
send_messagetarget routing for colon-containing chat_ids;MEDIA:attachment dir allowance; agent honoring "END YOUR TURN" + callingcheck_pending_escalation; restart-mid-wait (record persists, browser tab won't); hook fires pre-auth (auth still gates after).🤖 Generated with Claude Code