{"id":51025364,"url":"https://github.com/edycutjong/summon","last_synced_at":"2026-06-21T19:01:49.968Z","repository":{"id":364556455,"uuid":"1268305205","full_name":"edycutjong/summon","owner":"edycutjong","description":"👤 Human-in-the-loop sign-off agent — any agent hires Summon to get a human Approve/Reject via Telegram","archived":false,"fork":false,"pushed_at":"2026-06-13T13:13:10.000Z","size":6492,"stargazers_count":0,"open_issues_count":9,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-13T14:26:58.645Z","etag":null,"topics":["a2a","agent","croo","human-in-the-loop","telegram"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edycutjong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-13T11:26:58.000Z","updated_at":"2026-06-13T14:20:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/edycutjong/summon","commit_stats":null,"previous_names":["edycutjong/summon"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/edycutjong/summon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fsummon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fsummon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fsummon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fsummon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edycutjong","download_url":"https://codeload.github.com/edycutjong/summon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fsummon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34622271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a2a","agent","croo","human-in-the-loop","telegram"],"created_at":"2026-06-21T19:01:48.788Z","updated_at":"2026-06-21T19:01:49.953Z","avatar_url":"https://github.com/edycutjong.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"docs/icon-animated.svg\" alt=\"Summon Logo\" width=\"120\"\u003e\n\n  \u003ch1\u003eSummon 👤\u003c/h1\u003e\n  \u003cp\u003e\u003cem\u003eHuman-in-the-loop sign-off agent — any agent hires Summon to get a human Approve/Reject via Telegram\u003c/em\u003e\u003c/p\u003e\n  \u003cimg src=\"docs/readme-hero-animated.svg\" alt=\"Summon\" width=\"100%\"\u003e\n\n  \u003cbr/\u003e\n\n  [![Live Demo](https://img.shields.io/badge/🚀_Live-Demo-06b6d4?style=for-the-badge)](https://mock.croo.network)\n  [![Built for CROO Hackathon](https://img.shields.io/badge/DoraHacks-CROO_Hackathon_2026-8b5cf6?style=for-the-badge)](https://dorahacks.io/hackathon/croo-hackathon)\n\n  \u003cbr/\u003e\n\n  ![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?style=flat\u0026logo=typescript\u0026logoColor=white)\n  ![Node.js](https://img.shields.io/badge/Node.js-339933?style=flat\u0026logo=node.js\u0026logoColor=white)\n  [![CI](https://github.com/edycutjong/summon/actions/workflows/ci.yml/badge.svg)](https://github.com/edycutjong/summon/actions/workflows/ci.yml)\n\n\u003c/div\u003e\n\n---\n\n## 📸 See it in Action\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"docs/see-in-action.png\" alt=\"Summon Demo\" width=\"100%\"\u003e\n\u003c/div\u003e\n\n\u003e **The Human-in-the-Loop Workflow.** Agent triggers Summon → Summon sends Telegram message → Human taps Approve/Reject → Summon returns decision to agent.\n\n---\n\n## 💡 The Problem \u0026 Solution\nFully autonomous agents can make costly mistakes. Before executing a high-stakes transaction, agents need a reliable way to halt and ask for human permission.\n**Summon** solves this by providing a universal Human-in-the-loop agent that bridges on-chain AI with real-time human communication via Telegram.\n\n**Key Features:**\n- ⚡ **Instant Notification:** Pushes agent requests directly to your Telegram.\n- 🔒 **Secure Sign-off:** Only authorized Telegram users can approve or reject.\n- 🎨 **Seamless Integration:** Any agent in the Constellation A2A ecosystem can hire Summon to act as its human arbiter.\n\n## 🌌 The Constellation — On-Chain A2A Graph\n\nSummon is the constellation's **human arbiter**: any agent can hire it on-chain to put a real person in the loop, escrow-backed with an SLA auto-refund if no one responds in time. \"An agent pays a human for a yes/no decision, with on-chain escrow\" simply doesn't exist on a normal API marketplace.\n\n```mermaid\ngraph LR\n    User([Any Agent / User]) --\u003e|hires for sign-off| S[Summon 👤]\n    S --\u003e|Approve / Reject| H((Human via Telegram))\n    M[Maestro 🎼] --\u003e|escalates low-confidence work| S\n    G[Gauntlet 🧤] -.-\u003e|certifies| S\n    classDef hot fill:#F59E0B,stroke:#111,color:#111,font-weight:bold;\n    class S hot;\n```\n\n- **SLA safety:** if the human doesn't tap in time, Summon cancels the request and the buyer's escrow is cleanly refunded — no stuck funds.\n- **Adoption wedge:** the [Demo Insurance snippet](#️-hackathon-demo-insurance-copy-paste-integration) lets any hackathon bot add a human fallback in a few lines.\n\n## 🔗 Live Run Log — On-Chain Proof (Base Mainnet)\n\nReal CAP orders Summon fulfilled as a **provider** — an agent paid for a human decision.\n\n**Total real CAP orders: _0_** · _last updated: 2026-06-__\n\n| # | Date | Counterparty (requester) | Amount (USDC) | Order ID | Tx (BaseScan) | Decision |\n|---|------|--------------------------|---------------|----------|---------------|----------|\n| 1 | _2026-06-__ | _Maestro / external bot_ | _0.00_ | `_ord_…_` | [0x…](https://basescan.org/tx/0x…) | ✅ Approved / ❌ Rejected |\n\n\u003e Order IDs + the buyer's pay tx are in the provider logs and the CROO dashboard. Delete this note once populated.\n\n## 🏗️ Architecture \u0026 Tech Stack\n\n| Layer | Technology |\n|---|---|\n| **Runtime** | Node.js (TypeScript) |\n| **Messaging** | Telegram Bot API |\n| **Ecosystem** | Constellation A2A (croo-core) |\n| **Testing** | Vitest |\n\n## 🚀 Getting Started\n\n### Prerequisites\n- Node.js ≥ 20\n- npm\n- A Telegram Bot Token (from @BotFather)\n\n### Installation\n1. Clone: `git clone https://github.com/edycutjong/summon.git`\n2. Install: `npm install`\n3. Configure: `cp .env.example .env.local` and fill in `CROO_SDK_KEY`, `SUMMON_SERVICE_ID`, `TELEGRAM_BOT_TOKEN`, and `TELEGRAM_CHAT_ID` (or set `CROO_MOCK=true` for offline mode)\n4. Run: `npm run dev`\n\n### ▶️ Run it now — offline mock mode (no wallet, no USDC)\n```bash\nnpm install\nCROO_MOCK=true npm run dev   # boots the provider with no on-chain calls\n```\nFor the full human round-trip, set `TELEGRAM_BOT_TOKEN` + `TELEGRAM_CHAT_ID` and run `npm run dev` — taps on the Telegram inline buttons resolve the order.\n\n\u003e **For Judges:** Skip account creation! You can test the bot interaction by messaging our live test bot at @SummonTestBot.\n\n## 🧪 Testing \u0026 CI\n\n**4-stage pipeline:** Quality → Security → Build → Deploy Gate\n\n```bash\n# ── Code Quality ────────────────────────────\nnpm run lint          # ESLint\nnpm run typecheck     # TypeScript check\nnpm run test          # Run tests\nnpm run test:coverage # Coverage report\nnpm run ci            # Full quality gate\n\n# ── Security ────────────────────────────────\nmake security-scan    # npm audit + license check\n```\n\n| Layer | Tool | Status |\n|---|---|---|\n| Code Quality | ESLint + TypeScript | ✅ |\n| Unit Testing | Vitest | ✅ |\n| Security (SAST) | CodeQL | ✅ |\n| Security (SCA) | Dependabot + npm audit | ✅ |\n| Secret Scanning | TruffleHog | ✅ |\n\n## 📁 Project Structure\n```text\ndorahacks-croo-summon/\n├── docs/              # README assets (screenshots)\n├── src/               # Application source code\n├── scripts/           # Build and run scripts\n├── __tests__/         # Vitest test suites\n├── .env.example       # Environment template\n├── .github/           # CI workflows\n└── README.md          # You are here\n```\n\n## 🚢 Deploy\nContainerized for any PaaS. Summon is a background **worker** (Telegram polling + CROO WebSocket — no inbound port):\n```bash\ndocker build -t summon .\ndocker run --env-file .env.local summon\n```\n\n## 📄 License\n[MIT](LICENSE) © 2026 Edy Cu\n\n## 🙏 Acknowledgments\nBuilt for the DoraHacks CROO Hackathon 2026.\n\n## 🛡️ Hackathon \"Demo Insurance\" (Copy-Paste Integration)\n\n**Terrified your autonomous DeFi or Research bot might hallucinate or crash during the live judge demo?** \n\nAdd this 5-line `Summon` snippet to your error-catching block. If your bot hits a wall, it autonomously hires my agent for $0.01 USDC. I will get pinged on Telegram, manually review the data, and tap 'Approve/Override'. \n\nYour agent recovers gracefully, you get a bulletproof demo showing **A2A resilience**, and we both satisfy the Hackathon's **Anti-Sybil counterparty rule**.\n\n```typescript\nimport { hire } from \"@edycutjong/croo-core\";\n\n// Drop this in your catch block or low-confidence branch.\n// hire() runs the full requester flow: negotiate → pay → wait for delivery.\nconst { delivery } = await hire\u003c{ approved: boolean }\u003e(client, {\n  serviceId: process.env.SUMMON_SERVICE_ID!, // DM me in Discord for my ID!\n  requirement: {\n    prompt: \"Demo emergency: Bot confidence low. Proceed with execution?\",\n    context: JSON.stringify(failedPayload),\n  },\n  maxPrice: 1.0, // max USDC you're willing to spend\n});\n\nif (delivery.approved) {\n  // Proceed safely based on the human verdict!\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedycutjong%2Fsummon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedycutjong%2Fsummon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedycutjong%2Fsummon/lists"}