Skip to content

Human-in-the-loop purchase-completion agent (standalone plugin + checkout skill)#55

Draft
juniperbevensee wants to merge 2 commits into
mainfrom
dev/juniper/human-escalation-standalone
Draft

Human-in-the-loop purchase-completion agent (standalone plugin + checkout skill)#55
juniperbevensee wants to merge 2 commits into
mainfrom
dev/juniper/human-escalation-standalone

Conversation

@juniperbevensee

Copy link
Copy Markdown
Collaborator

Summary

Experimental human-in-the-loop purchasing capability, shipped as a standalone, opt-in HSM artifact — zero hermes-agent image footprint, zero fork divergence.

  • Plugin infra/templates/plugins/human_escalation/ — registers escalate_to_human + check_pending_escalation tools and a pre_gateway_dispatch resume 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.
  • Skill 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.
  • Docsimage-vs-hsm-boundary.md updated with the default-bundle-vs-optional-artifact distinction, this worked example, and a skill-packaging caveat (file skill vs register_skill).

Design (Approach A′ — no-patch async)

Uses only existing extension points (tool registration, the pre_gateway_dispatch hook contract, the send_message tool, 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 plugins parent package on sys.path.

Test Plan — manual E2E on a real agent (gates merge-to-default; spends real money at the end)

  • Install on personal hermes via HSM (plugins.enabled += human_escalation; install the checkout skill). Confirm tools register at boot.
  • Smoke: ask it to escalate_to_human for a code → it posts + ends turn → reply → it resumes via check_pending_escalation. (Validates agent reliably re-enters on a bare reply.)
  • Moshtix dry-run to the confirmation gate → decline → assert nothing charged.
  • Escalate, wait 3–5 min, then reply → assert resume against the still-live Camofox tab. (Tab persistence already validated standalone on the mini.)
  • One real small purchase with affirmative confirm → assert confirmation number; capture Moshtix selectors into the skill.
  • Verify Signal target routing (platform:chat_id) and the MEDIA: attachment path for a QR/VNC link_handoff.

Residual real-runtime risks (validate in E2E, not blockers)

Signal send_message target routing for colon-containing chat_ids; MEDIA: attachment dir allowance; agent honoring "END YOUR TURN" + calling check_pending_escalation; restart-mid-wait (record persists, browser tab won't); hook fires pre-auth (auth still gates after).

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant