[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76D2F3TNPSHK070Z0XDX3VW":3,"skill-same:01M76D2F3TNPSHK070Z0XDX3VW":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":13,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":47,"install":48,"resources":60},"01M76D2F3TNPSHK070Z0XDX3VW","hitl-protocol",null,"HITL Protocol — the open standard for human decisions in autonomous agent workflows. When a website or API needs human input, it returns HTTP 202 with a review URL. Autonomous agents like OpenClaw, Claude, Codex, or Goose forward the URL, poll for the structured result, and continue. Use this skill to make any website agent-ready, or to handle human-in-the-loop responses in your agent. Covers approval, selection, input forms, confirmation, and escalation review types. Supports polling, SSE, webhook transports, channel-native inline buttons (Telegram, Slack, Discord, WhatsApp, Teams), opaque token security, multi-step form wizards, and multi-round edit cycles.","meghal86\u002Fstacksignal","meghal86","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F37388715?v=4","01M6CS2EW8SK89GH52R2ZEN8QQ","01M728J5CGY456EETEFG6HJBTM",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fhitl-protocol\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: hitl-protocol\ndescription: \"HITL Protocol — the open standard for human decisions in autonomous agent workflows. When a website or API needs human input, it returns HTTP 202 with a review URL. Autonomous agents like OpenClaw, Claude, Codex, or Goose forward the URL, poll for the structured result, and continue. Use this skill to make any website agent-ready, or to handle human-in-the-loop responses in your agent. Covers approval, selection, input forms, confirmation, and escalation review types. Supports polling, SSE, webhook transports, channel-native inline buttons (Telegram, Slack, Discord, WhatsApp, Teams), opaque token security, multi-step form wizards, and multi-round edit cycles.\"\nlicense: Apache-2.0\ncompatibility:\n  - claude\n  - codex\n  - gemini\n  - openclaw\n  - goose\n  - copilot\nmetadata:\n  version: \"0.6\"\n  spec_url: \"https:\u002F\u002Fgithub.com\u002Frotorstar\u002Fhitl-protocol\u002Fblob\u002Fmain\u002Fspec\u002Fv0.6\u002Fhitl-protocol.md\"\n  hitl:\n    supported: true\n    types: [approval, selection, input, confirmation, escalation]\n    info: \"Teaches the HITL Protocol itself — for building HITL services and HITL-aware agents.\"\n---\n\n# HITL Protocol\n\nHITL Protocol is to human decisions what OAuth is to authentication — an open standard connecting **Services**, **Agents**, and **Humans**. When a service needs human input, it returns HTTP 202 with a review URL. The agent forwards the URL to the human. The human opens it in a browser, gets a rich UI, and makes an informed decision. The agent polls for the structured result and continues.\n\nFor simple decisions (confirm\u002Fcancel, approve\u002Freject), agents can render **native messaging buttons** directly in Telegram, Slack, Discord, WhatsApp, or Teams — no browser needed. The service opts in via `submit_url`.\n\n**No SDK required. No UI framework mandated. Just HTTP + URL + polling.**\n\n**[Interactive Playground](https:\u002F\u002Frotorstar.github.io\u002Fhitl-protocol\u002Fplayground\u002Findex.html)** — try all review types, transports, and inline actions live in your browser.\n\n## Who Are You?\n\n| Your role | You want to... | Read |\n|-----------|----------------|------|\n| Service\u002Fwebsite builder | Add HITL endpoints to your API so agents can request human input | [Service Integration Guide](skills\u002Freferences\u002Fservice-integration.md) |\n| Agent developer | Handle HTTP 202 + HITL responses from services | [Agent Integration Guide](skills\u002Freferences\u002Fagent-integration.md) |\n| Both \u002F Learning | Understand the full protocol | Continue reading below |\n\n## The Flow\n\n```\nStandard flow (all review types):\n1. Human → Agent:    \"Find me jobs in Berlin\"\n2. Agent → Service:  POST \u002Fapi\u002Fsearch {query: \"Senior Dev Berlin\"}\n3. Service → Agent:  HTTP 202 + hitl object (review_url, poll_url, type, prompt)\n4. Agent → Human:    \"Found 5 jobs. Review here: {review_url}\"\n5. Human → Browser:  Opens review_url → rich UI (cards, forms, buttons)\n6. Human → Service:  Makes selection, clicks Submit\n7. Agent → Service:  GET {poll_url} → {status: \"completed\", result: {action, data}}\n8. Agent → Human:    \"Applied to 2 selected jobs.\"\n\nInline flow (v0.6 — simple decisions only, when submit_url present):\n1. Human → Agent:    \"Send my application emails\"\n2. Agent → Service:  POST \u002Fapi\u002Fsend {emails: [...]}\n3. Service → Agent:  HTTP 202 + hitl object (incl. submit_url, submit_token, inline_actions)\n4. Agent → Human:    Native buttons in chat: [Confirm] [Cancel] [Details →]\n5. Human → Agent:    Taps [Confirm] in chat\n6. Agent → Service:  POST {submit_url} {action: \"confirm\", submitted_via: \"telegram\"}\n7. Service → Agent:  200 OK {status: \"completed\"}\n8. Agent → Human:    Updates message: \"Confirmed — 3 emails sent.\"\n```\n\nThe agent never renders UI. The service hosts the review page. Sensitive data stays in the browser — never passes through the agent. The inline flow is an optional shortcut for simple decisions.\n\n## Feature Matrix\n\n| Feature | Details |\n|---------|---------|\n| **Review types** | `approval`, `selection`, `input`, `confirmation`, `escalation` |\n| **Form field types** | `text`, `textarea`, `number`, `date`, `email`, `url`, `boolean`, `select`, `multiselect`, `range`, custom `x-*` |\n| **Transport** | Polling (required), SSE (optional), Callback\u002FWebhook (optional) |\n| **Inline submit** | `submit_url` + native messaging buttons (Telegram, Slack, Discord, WhatsApp, Teams) — service opt-in |\n| **States** | `pending` → `opened` → `in_progress` → `completed` \u002F `expired` \u002F `cancelled` |\n| **Security** | Opaque tokens (43 chars, base64url, 256-bit entropy), SHA-256 hash storage, timing-safe comparison, HTTPS only |\n| **Multi-round** | `previous_case_id` \u002F `next_case_id` for iterative edit cycles (Approval type) |\n| **Forms** | Single-step fields, multi-step wizard, conditional visibility, validation rules, progress tracking |\n| **Timeouts** | ISO 8601 duration, `default_action`: `skip` \u002F `approve` \u002F `reject` \u002F `abort` |\n| **Discovery** | `.well-known\u002Fhitl.json`, SKILL.md `metadata.hitl` extension |\n| **Reminders** | `reminder_at` timestamps, `review.reminder` SSE event |\n| **Rate limiting** | 60 requests\u002Fmin per case on poll endpoint, `Retry-After` header |\n\n## Five Review Types\n\n| Type | Actions | Multi-round | Form fields | Use case |\n|------|---------|:-----------:|:-----------:|----------|\n| **Approval** | `approve`, `edit`, `reject` | Yes | No | Artifact review (CV, email, deployment plan) |\n| **Selection** | `select` | No | No | Choose from options (job listings, targets) |\n| **Input** | `submit` | No | Yes | Structured data entry (salary, dates, preferences) |\n| **Confirmation** | `confirm`, `cancel` | No | No | Irreversible action gate (send emails, deploy) |\n| **Escalation** | `retry`, `skip`, `abort` | No | No | Error recovery (deployment failed, API error) |\n\n## HITL Object (HTTP 202 Response Body)\n\nWhen a service needs human input, it returns HTTP 202 with this structure:\n\n```json\n{\n  \"status\": \"human_input_required\",\n  \"message\": \"5 matching jobs found. Please select which ones to apply for.\",\n  \"hitl\": {\n    \"spec_version\": \"0.6\",\n    \"case_id\": \"review_abc123\",\n    \"review_url\": \"https:\u002F\u002Fservice.example.com\u002Freview\u002Fabc123?token=K7xR2mN4pQ...\",\n    \"poll_url\": \"https:\u002F\u002Fapi.service.example.com\u002Fv1\u002Freviews\u002Fabc123\u002Fstatus\",\n    \"type\": \"selection\",\n    \"prompt\": \"Select which jobs to apply for\",\n    \"timeout\": \"24h\",\n    \"default_action\": \"skip\",\n    \"created_at\": \"2026-02-22T10:00:00Z\",\n    \"expires_at\": \"2026-02-23T10:00:00Z\",\n    \"context\": {\n      \"total_options\": 5,\n      \"query\": \"Senior Dev Berlin\"\n    }\n  }\n}\n```\n\n### Required Fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `spec_version` | `\"0.6\"` | Protocol version |\n| `case_id` | string | Unique, URL-safe identifier (pattern: `review_{random}`) |\n| `review_url` | URL | HTTPS URL to review page with opaque bearer token |\n| `poll_url` | URL | Status polling endpoint |\n| `type` | enum | `approval` \u002F `selection` \u002F `input` \u002F `confirmation` \u002F `escalation` \u002F `x-*` |\n| `prompt` | string | What the human needs to decide (max 500 chars) |\n| `created_at` | datetime | ISO 8601 creation timestamp |\n| `expires_at` | datetime | ISO 8601 expiration timestamp |\n\n### Optional Fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `timeout` | duration | How long the review stays open (`24h`, `PT24H`, `P7D`) |\n| `default_action` | enum | `skip` \u002F `approve` \u002F `reject` \u002F `abort` — action on expiry |\n| `callback_url` | URL \u002F null | Echoed callback URL if agent provided one |\n| `events_url` | URL | SSE endpoint for real-time status events |\n| `context` | object | Arbitrary data for the review page (not processed by agent) |\n| `reminder_at` | datetime \u002F datetime[] | When to re-send the review URL |\n| `previous_case_id` | string | Links to prior case in multi-round chain |\n| `surface` | object | UI format declaration (`format`, `version`) |\n| `submit_url` | URL | Agent-submit endpoint for channel-native inline buttons (v0.6) |\n| `submit_token` | string | Bearer token for `submit_url` authentication (required if `submit_url` set) |\n| `inline_actions` | string[] | Actions permitted via `submit_url` (e.g. `[\"confirm\", \"cancel\"]`). If absent, all actions for the type are allowed. |\n\n## Poll Response (Completed)\n\n```json\n{\n  \"status\": \"completed\",\n  \"case_id\": \"review_abc123\",\n  \"completed_at\": \"2026-02-22T10:15:00Z\",\n  \"result\": {\n    \"action\": \"select\",\n    \"data\": {\n      \"selected_jobs\": [\"job-123\", \"job-456\"],\n      \"note\": \"Only remote positions\"\n    }\n  }\n}\n```\n\nThe `result` object is present only when `status` is `\"completed\"`. It always contains `action` (string) and `data` (object with type-dependent content).\n\n### Poll Response Statuses\n\n| Status | Terminal | Description | Key fields |\n|--------|:--------:|-------------|------------|\n| `pending` | No | Case created, human hasn't opened URL | `expires_at` |\n| `opened` | No | Human opened the review URL | `opened_at` |\n| `in_progress` | No | Human is interacting with the form | `progress` (optional) |\n| `completed` | Yes | Human submitted response | `result`, `completed_at`, `responded_by` |\n| `expired` | Yes | Timeout reached | `expired_at`, `default_action` |\n| `cancelled` | Yes | Human clicked cancel | `cancelled_at`, `reason` |\n\n## State Machine\n\n```\n            +---------------------------------------------+\n            |                                             v\n[created] -> pending -> opened -> in_progress -> completed [terminal]\n               |         |          |\n               |         |          +---------> cancelled  [terminal]\n               |         |\n               |         +--> completed     [terminal]\n               |         +--> expired       [terminal]\n               |         +--> cancelled     [terminal]\n               |\n               +----------> expired          [terminal]\n               +----------> cancelled        [terminal]\n```\n\nTerminal states (`completed`, `expired`, `cancelled`) are immutable — no further transitions.\n\n## For Services: Quick Start\n\nReturn HTTP 202 when human input is needed:\n\n```javascript\n\u002F\u002F Express \u002F Hono \u002F any HTTP framework\napp.post('\u002Fapi\u002Fsearch', async (req, res) => {\n  const results = await searchJobs(req.body.query);\n\n  \u002F\u002F Create review case with opaque token\n  const caseId = `review_${crypto.randomBytes(16).toString('hex')}`;\n  const token = crypto.randomBytes(32).toString('base64url'); \u002F\u002F 43 chars\n  const tokenHash = crypto.createHash('sha256').update(token).digest('hex');\n\n  store.set(caseId, {\n    status: 'pending',\n    tokenHash,\n    results,\n    created_at: new Date().toISOString(),\n    expires_at: new Date(Date.now() + 86400000).toISOString(),\n  });\n\n  res.status(202).json({\n    status: 'human_input_required',\n    message: `${results.length} jobs found. Please select which ones to apply for.`,\n    hitl: {\n      spec_version: '0.6',\n      case_id: caseId,\n      review_url: `https:\u002F\u002Fyourservice.com\u002Freview\u002F${caseId}?token=${token}`,\n      poll_url: `https:\u002F\u002Fapi.yourservice.com\u002Fv1\u002Freviews\u002F${caseId}\u002Fstatus`,\n      type: 'selection',\n      prompt: 'Select which jobs to apply for',\n      timeout: '24h',\n      default_action: 'skip',\n      created_at: store.get(caseId).created_at,\n      expires_at: store.get(caseId).expires_at,\n    },\n  });\n});\n```\n\nYou also need: a review page (any web framework), a poll endpoint (`GET \u002Freviews\u002F:caseId\u002Fstatus`), and a response endpoint (`POST \u002Freviews\u002F:caseId\u002Frespond`). See [Service Integration Guide](skills\u002Freferences\u002Fservice-integration.md) for full details.\n\n## For Agents: Quick Start\n\nHandle HTTP 202 responses — ~15 lines:\n\n```python\nimport time, httpx\n\nresponse = httpx.post(\"https:\u002F\u002Fapi.jobboard.com\u002Fsearch\", json=query)\n\nif response.status_code == 202:\n    hitl = response.json()[\"hitl\"]\n\n    # v0.6: Check for inline submit support\n    if \"submit_url\" in hitl and \"submit_token\" in hitl:\n        # Render native buttons in messaging platform (e.g. Telegram, Slack)\n        send_inline_buttons(hitl[\"prompt\"], hitl[\"inline_actions\"], hitl[\"review_url\"])\n        # When human taps button → POST to submit_url (see Agent Integration Guide)\n    else:\n        # Standard flow: forward URL to human\n        send_to_user(f\"{hitl['prompt']}\\n{hitl['review_url']}\")\n\n    # Poll for result (standard flow or fallback)\n    while True:\n        time.sleep(30)\n        poll = httpx.get(hitl[\"poll_url\"], headers=auth).json()\n\n        if poll[\"status\"] == \"completed\":\n            result = poll[\"result\"]  # {action: \"select\", data: {...}}\n            break\n        if poll[\"status\"] in (\"expired\", \"cancelled\"):\n            break\n```\n\nNo SDK. No UI rendering. Just HTTP + URL forwarding + polling. See [Agent Integration Guide](skills\u002Freferences\u002Fagent-integration.md) for inline submit, SSE, callbacks, multi-round, and edge cases.\n\n## Three Transport Modes\n\n| Transport | Agent needs public endpoint? | Real-time? | Complexity |\n|-----------|:---------------------------:|:----------:|:----------:|\n| **Polling** (default) | No | No | Minimal |\n| **SSE** (optional) | No | Yes | Low |\n| **Callback** (optional) | Yes | Yes | Medium |\n\nPolling is the baseline — every HITL-compliant service MUST support it. SSE and callbacks are optional enhancements.\n\n## Channel-Native Inline Actions (v0.6)\n\nFor simple decisions, agents can render **native messaging buttons** instead of sending a URL. The human taps a button directly in the chat — no browser switch needed.\n\n**How it works:** The service includes `submit_url` + `submit_token` in the HITL object. The agent detects these fields and renders platform-native buttons. When the human taps a button, the agent POSTs the action to `submit_url`. The messaging platform is passive — it renders whatever the agent sends. No messenger auto-detects HITL support.\n\n**When to use inline buttons:**\n\n| Review type | Inline possible? | Reason |\n|-------------|:----------------:|--------|\n| **Confirmation** | Yes | 2 buttons: Confirm \u002F Cancel |\n| **Escalation** | Yes | 3 buttons: Retry \u002F Skip \u002F Abort |\n| **Approval** (simple) | Yes | 2 buttons: Approve \u002F Reject (without edit) |\n| **Approval** (with edit) | URL only | Edit requires rich UI |\n| **Selection** | URL only | Needs list\u002Fcards UI |\n| **Input** | URL only | Needs form fields |\n\n**Always include a URL fallback button** (e.g. \"Details &#8594;\") linking to `review_url` — the human can always switch to the full review page.\n\n**Platform requirements:** The agent must be a platform bot (Telegram Bot via BotFather, Slack App, Discord Bot, WhatsApp Business API, Teams Bot) to send native buttons. See [Agent Integration Guide](skills\u002Freferences\u002Fagent-integration.md) for platform-specific rendering patterns.\n\n## Non-Goals\n\n- **Does NOT render review UI** — the service hosts and renders the review page. The agent is a messenger.\n- **Does NOT define the review page framework** — any web technology works (React, plain HTML, etc.).\n- **Does NOT replace OAuth** — HITL is for decisions, not authentication.\n- **Does NOT submit on behalf of the human** — unless the human explicitly triggers an inline action button in a messaging platform (v0.6 `submit_url`).\n\n## SKILL.md Extension for Services\n\nServices that use HITL can declare support in their own SKILL.md frontmatter:\n\n```yaml\nmetadata:\n  hitl:\n    supported: true\n    types: [selection, confirmation]\n    supports_inline_submit: true\n    review_base_url: \"https:\u002F\u002Fyourservice.com\u002Freview\"\n    timeout_default: \"24h\"\n    info: \"May ask user to select preferred jobs or confirm applications.\"\n```\n\nSee [spec Section 12](spec\u002Fv0.6\u002Fhitl-protocol.md) for the full field reference.\n\n## Resources\n\n- [Full Specification (v0.6)](spec\u002Fv0.6\u002Fhitl-protocol.md)\n- [OpenAPI 3.1 Spec](schemas\u002Fopenapi.yaml) — all endpoints documented\n- [JSON Schemas](schemas\u002F) — HITL object, poll response, form field, submit request definitions\n- [Reference Implementations](implementations\u002Freference-service\u002F) — Express 5, Hono, Next.js, FastAPI\n- [Review Page Templates](templates\u002F) — HTML templates for all 5 review types\n- [Examples](examples\u002F) — 12 end-to-end flows (incl. inline confirmation, escalation, hybrid approval)\n- [Agent Implementation Checklist](agents\u002Fchecklist.md) — detailed agent guide with pseudocode\n- [Interactive Playground](playground\u002F)\n- [SDK Design Guide](docs\u002Fsdk-guide.md) — build a community SDK\n","# HITL Protocol\n\nHITL Protocol is to human decisions what OAuth is to authentication — an open standard connecting **Services**, **Agents**, and **Humans**. When a service needs human input, it returns HTTP 202 with a review URL. The agent forwards the URL to the human. The human opens it in a browser, gets a rich UI, and makes an informed decision. The agent polls for the structured result and continues.\n\nFor simple decisions (confirm\u002Fcancel, approve\u002Freject), agents can render **native messaging buttons** directly in Telegram, Slack, Discord, WhatsApp, or Teams — no browser needed. The service opts in via `submit_url`.\n\n**No SDK required. No UI framework mandated. Just HTTP + URL + polling.**\n\n**[Interactive Playground](https:\u002F\u002Frotorstar.github.io\u002Fhitl-protocol\u002Fplayground\u002Findex.html)** — try all review types, transports, and inline actions live in your browser.\n\n## Who Are You?\n\n| Your role | You want to... | Read |\n|-----------|----------------|------|\n| Service\u002Fwebsite builder | Add HITL endpoints to your API so agents can request human input | [Service Integration Guide](skills\u002Freferences\u002Fservice-integration.md) |\n| Agent developer | Handle HTTP 202 + HITL responses from services | [Agent Integration Guide](skills\u002Freferences\u002Fagent-integration.md) |\n| Both \u002F Learning | Understand the full protocol | Continue reading below |\n\n## The Flow\n\n```\nStandard flow (all review types):\n1. Human → Agent:    \"Find me jobs in Berlin\"\n2. Agent → Service:  POST \u002Fapi\u002Fsearch {query: \"Senior Dev Berlin\"}\n3. Service → Agent:  HTTP 202 + hitl object (review_url, poll_url, type, prompt)\n4. Agent → Human:    \"Found 5 jobs. Review here: {review_url}\"\n5. Human → Browser:  Opens review_url → rich UI (cards, forms, buttons)\n6. Human → Service:  Makes selection, clicks Submit\n7. Agent → Service:  GET {poll_url} → {status: \"completed\", result: {action, data}}\n8. Agent → Human:    \"Applied to 2 selected jobs.\"\n\nInline flow (v0.6 — simple decisions only, when submit_url present):\n1. Human → Agent:    \"Send my application emails\"\n2. Agent → Service:  POST \u002Fapi\u002Fsend {emails: [...]}\n3. Service → Agent:  HTTP 202 + hitl object (incl. submit_url, submit_token, inline_actions)\n4. Agent → Human:    Native buttons in chat: [Confirm] [Cancel] [Details →]\n5. Human → Agent:    Taps [Confirm] in chat\n6. Agent → Service:  POST {submit_url} {action: \"confirm\", submitted_via: \"telegram\"}\n7. Service → Agent:  200 OK {status: \"completed\"}\n8. Agent → Human:    Updates message: \"Confirmed — 3 emails sent.\"\n```\n\nThe agent never renders UI. The service hosts the review page. Sensitive data stays in the browser — never passes through the agent. The inline flow is an optional shortcut for simple decisions.\n\n## Feature Matrix\n\n| Feature | Details |\n|---------|---------|\n| **Review types** | `approval`, `selection`, `input`, `confirmation`, `escalation` |\n| **Form field types** | `text`, `textarea`, `number`, `date`, `email`, `url`, `boolean`, `select`, `multiselect`, `range`, custom `x-*` |\n| **Transport** | Polling (required), SSE (optional), Callback\u002FWebhook (optional) |\n| **Inline submit** | `submit_url` + native messaging buttons (Telegram, Slack, Discord, WhatsApp, Teams) — service opt-in |\n| **States** | `pending` → `opened` → `in_progress` → `completed` \u002F `expired` \u002F `cancelled` |\n| **Security** | Opaque tokens (43 chars, base64url, 256-bit entropy), SHA-256 hash storage, timing-safe comparison, HTTPS only |\n| **Multi-round** | `previous_case_id` \u002F `next_case_id` for iterative edit cycles (Approval type) |\n| **Forms** | Single-step fields, multi-step wizard, conditional visibility, validation rules, progress tracking |\n| **Timeouts** | ISO 8601 duration, `default_action`: `skip` \u002F `approve` \u002F `reject` \u002F `abort` |\n| **Discovery** | `.well-known\u002Fhitl.json`, SKILL.md `metadata.hitl` extension |\n| **Reminders** | `reminder_at` timestamps, `review.reminder` SSE event |\n| **Rate limiting** | 60 requests\u002Fmin per case on poll endpoint, `Retry-After` header |\n\n## Five Review Types\n\n| Type | Actions | Multi-round | Form fields | Use case |\n|------|---------|:-----------:|:-----------:|----------|\n| **Approval** | `approve`, `edit`, `reject` | Yes | No | Artifact review (CV, email, deployment plan) |\n| **Selection** | `select` | No | No | Choose from options (job listings, targets) |\n| **Input** | `submit` | No | Yes | Structured data entry (salary, dates, preferences) |\n| **Confirmation** | `confirm`, `cancel` | No | No | Irreversible action gate (send emails, deploy) |\n| **Escalation** | `retry`, `skip`, `abort` | No | No | Error recovery (deployment failed, API error) |\n\n## HITL Object (HTTP 202 Response Body)\n\nWhen a service needs human input, it returns HTTP 202 with this structure:\n\n```json\n{\n  \"status\": \"human_input_required\",\n  \"message\": \"5 matching jobs found. Please select which ones to apply for.\",\n  \"hitl\": {\n    \"spec_version\": \"0.6\",\n    \"case_id\": \"review_abc123\",\n    \"review_url\": \"https:\u002F\u002Fservice.example.com\u002Freview\u002Fabc123?token=K7xR2mN4pQ...\",\n    \"poll_url\": \"https:\u002F\u002Fapi.service.example.com\u002Fv1\u002Freviews\u002Fabc123\u002Fstatus\",\n    \"type\": \"selection\",\n    \"prompt\": \"Select which jobs to apply for\",\n    \"timeout\": \"24h\",\n    \"default_action\": \"skip\",\n    \"created_at\": \"2026-02-22T10:00:00Z\",\n    \"expires_at\": \"2026-02-23T10:00:00Z\",\n    \"context\": {\n      \"total_options\": 5,\n      \"query\": \"Senior Dev Berlin\"\n    }\n  }\n}\n```\n\n### Required Fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `spec_version` | `\"0.6\"` | Protocol version |\n| `case_id` | string | Unique, URL-safe identifier (pattern: `review_{random}`) |\n| `review_url` | URL | HTTPS URL to review page with opaque bearer token |\n| `poll_url` | URL | Status polling endpoint |\n| `type` | enum | `approval` \u002F `selection` \u002F `input` \u002F `confirmation` \u002F `escalation` \u002F `x-*` |\n| `prompt` | string | What the human needs to decide (max 500 chars) |\n| `created_at` | datetime | ISO 8601 creation timestamp |\n| `expires_at` | datetime | ISO 8601 expiration timestamp |\n\n### Optional Fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `timeout` | duration | How long the review stays open (`24h`, `PT24H`, `P7D`) |\n| `default_action` | enum | `skip` \u002F `approve` \u002F `reject` \u002F `abort` — action on expiry |\n| `callback_url` | URL \u002F null | Echoed callback URL if agent provided one |\n| `events_url` | URL | SSE endpoint for real-time status events |\n| `context` | object | Arbitrary data for the review page (not processed by agent) |\n| `reminder_at` | datetime \u002F datetime[] | When to re-send the review URL |\n| `previous_case_id` | string | Links to prior case in multi-round chain |\n| `surface` | object | UI format declaration (`format`, `version`) |\n| `submit_url` | URL | Agent-submit endpoint for channel-native inline buttons (v0.6) |\n| `submit_token` | string | Bearer token for `submit_url` authentication (required if `submit_url` set) |\n| `inline_actions` | string[] | Actions permitted via `submit_url` (e.g. `[\"confirm\", \"cancel\"]`). If absent, all actions for the type are allowed. |\n\n## Poll Response (Completed)\n\n```json\n{\n  \"status\": \"completed\",\n  \"case_id\": \"review_abc123\",\n  \"completed_at\": \"2026-02-22T10:15:00Z\",\n  \"result\": {\n    \"action\": \"select\",\n    \"data\": {\n      \"selected_jobs\": [\"job-123\", \"job-456\"],\n      \"note\": \"Only remote positions\"\n    }\n  }\n}\n```\n\nThe `result` object is present only when `status` is `\"completed\"`. It always contains `action` (string) and `data` (object with type-dependent content).\n\n### Poll Response Statuses\n\n| Status | Terminal | Description | Key fields |\n|--------|:--------:|-------------|------------|\n| `pending` | No | Case created, human hasn't opened URL | `expires_at` |\n| `opened` | No | Human opened the review URL | `opened_at` |\n| `in_progress` | No | Human is interacting with the form | `progress` (optional) |\n| `completed` | Yes | Human submitted response | `result`, `completed_at`, `responded_by` |\n| `expired` | Yes | Timeout reached | `expired_at`, `default_action` |\n| `cancelled` | Yes | Human clicked cancel | `cancelled_at`, `reason` |\n\n## State Machine\n\n```\n            +---------------------------------------------+\n            |                                             v\n[created] -> pending -> opened -> in_progress -> completed [terminal]\n               |         |          |\n               |         |          +---------> cancelled  [terminal]\n               |         |\n               |         +--> completed     [terminal]\n               |         +--> expired       [terminal]\n               |         +--> cancelled     [terminal]\n               |\n               +----------> expired          [terminal]\n               +----------> cancelled        [terminal]\n```\n\nTerminal states (`completed`, `expired`, `cancelled`) are immutable — no further transitions.\n\n## For Services: Quick Start\n\nReturn HTTP 202 when human input is needed:\n\n```javascript\n\u002F\u002F Express \u002F Hono \u002F any HTTP framework\napp.post('\u002Fapi\u002Fsearch', async (req, res) => {\n  const results = await searchJobs(req.body.query);\n\n  \u002F\u002F Create review case with opaque token\n  const caseId = `review_${crypto.randomBytes(16).toString('hex')}`;\n  const token = crypto.randomBytes(32).toString('base64url'); \u002F\u002F 43 chars\n  const tokenHash = crypto.createHash('sha256').update(token).digest('hex');\n\n  store.set(caseId, {\n    status: 'pending',\n    tokenHash,\n    results,\n    created_at: new Date().toISOString(),\n    expires_at: new Date(Date.now() + 86400000).toISOString(),\n  });\n\n  res.status(202).json({\n    status: 'human_input_required',\n    message: `${results.length} jobs found. Please select which ones to apply for.`,\n    hitl: {\n      spec_version: '0.6',\n      case_id: caseId,\n      review_url: `https:\u002F\u002Fyourservice.com\u002Freview\u002F${caseId}?token=${token}`,\n      poll_url: `https:\u002F\u002Fapi.yourservice.com\u002Fv1\u002Freviews\u002F${caseId}\u002Fstatus`,\n      type: 'selection',\n      prompt: 'Select which jobs to apply for',\n      timeout: '24h',\n      default_action: 'skip',\n      created_at: store.get(caseId).created_at,\n      expires_at: store.get(caseId).expires_at,\n    },\n  });\n});\n```\n\nYou also need: a review page (any web framework), a poll endpoint (`GET \u002Freviews\u002F:caseId\u002Fstatus`), and a response endpoint (`POST \u002Freviews\u002F:caseId\u002Frespond`). See [Service Integration Guide](skills\u002Freferences\u002Fservice-integration.md) for full details.\n\n## For Agents: Quick Start\n\nHandle HTTP 202 responses — ~15 lines:\n\n```python\nimport time, httpx\n\nresponse = httpx.post(\"https:\u002F\u002Fapi.jobboard.com\u002Fsearch\", json=query)\n\nif response.status_code == 202:\n    hitl = response.json()[\"hitl\"]\n\n    # v0.6: Check for inline submit support\n    if \"submit_url\" in hitl and \"submit_token\" in hitl:\n        # Render native buttons in messaging platform (e.g. Telegram, Slack)\n        send_inline_buttons(hitl[\"prompt\"], hitl[\"inline_actions\"], hitl[\"review_url\"])\n        # When human taps button → POST to submit_url (see Agent Integration Guide)\n    else:\n        # Standard flow: forward URL to human\n        send_to_user(f\"{hitl['prompt']}\\n{hitl['review_url']}\")\n\n    # Poll for result (standard flow or fallback)\n    while True:\n        time.sleep(30)\n        poll = httpx.get(hitl[\"poll_url\"], headers=auth).json()\n\n        if poll[\"status\"] == \"completed\":\n            result = poll[\"result\"]  # {action: \"select\", data: {...}}\n            break\n        if poll[\"status\"] in (\"expired\", \"cancelled\"):\n            break\n```\n\nNo SDK. No UI rendering. Just HTTP + URL forwarding + polling. See [Agent Integration Guide](skills\u002Freferences\u002Fagent-integration.md) for inline submit, SSE, callbacks, multi-round, and edge cases.\n\n## Three Transport Modes\n\n| Transport | Agent needs public endpoint? | Real-time? | Complexity |\n|-----------|:---------------------------:|:----------:|:----------:|\n| **Polling** (default) | No | No | Minimal |\n| **SSE** (optional) | No | Yes | Low |\n| **Callback** (optional) | Yes | Yes | Medium |\n\nPolling is the baseline — every HITL-compliant service MUST support it. SSE and callbacks are optional enhancements.\n\n## Channel-Native Inline Actions (v0.6)\n\nFor simple decisions, agents can render **native messaging buttons** instead of sending a URL. The human taps a button directly in the chat — no browser switch needed.\n\n**How it works:** The service includes `submit_url` + `submit_token` in the HITL object. The agent detects these fields and renders platform-native buttons. When the human taps a button, the agent POSTs the action to `submit_url`. The messaging platform is passive — it renders whatever the agent sends. No messenger auto-detects HITL support.\n\n**When to use inline buttons:**\n\n| Review type | Inline possible? | Reason |\n|-------------|:----------------:|--------|\n| **Confirmation** | Yes | 2 buttons: Confirm \u002F Cancel |\n| **Escalation** | Yes | 3 buttons: Retry \u002F Skip \u002F Abort |\n| **Approval** (simple) | Yes | 2 buttons: Approve \u002F Reject (without edit) |\n| **Approval** (with edit) | URL only | Edit requires rich UI |\n| **Selection** | URL only | Needs list\u002Fcards UI |\n| **Input** | URL only | Needs form fields |\n\n**Always include a URL fallback button** (e.g. \"Details &#8594;\") linking to `review_url` — the human can always switch to the full review page.\n\n**Platform requirements:** The agent must be a platform bot (Telegram Bot via BotFather, Slack App, Discord Bot, WhatsApp Business API, Teams Bot) to send native buttons. See [Agent Integration Guide](skills\u002Freferences\u002Fagent-integration.md) for platform-specific rendering patterns.\n\n## Non-Goals\n\n- **Does NOT render review UI** — the service hosts and renders the review page. The agent is a messenger.\n- **Does NOT define the review page framework** — any web technology works (React, plain HTML, etc.).\n- **Does NOT replace OAuth** — HITL is for decisions, not authentication.\n- **Does NOT submit on behalf of the human** — unless the human explicitly triggers an inline action button in a messaging platform (v0.6 `submit_url`).\n\n## SKILL.md Extension for Services\n\nServices that use HITL can declare support in their own SKILL.md frontmatter:\n\n```yaml\nmetadata:\n  hitl:\n    supported: true\n    types: [selection, confirmation]\n    supports_inline_submit: true\n    review_base_url: \"https:\u002F\u002Fyourservice.com\u002Freview\"\n    timeout_default: \"24h\"\n    info: \"May ask user to select preferred jobs or confirm applications.\"\n```\n\nSee [spec Section 12](spec\u002Fv0.6\u002Fhitl-protocol.md) for the full field reference.\n\n## Resources\n\n- [Full Specification (v0.6)](spec\u002Fv0.6\u002Fhitl-protocol.md)\n- [OpenAPI 3.1 Spec](schemas\u002Fopenapi.yaml) — all endpoints documented\n- [JSON Schemas](schemas\u002F) — HITL object, poll response, form field, submit request definitions\n- [Reference Implementations](implementations\u002Freference-service\u002F) — Express 5, Hono, Next.js, FastAPI\n- [Review Page Templates](templates\u002F) — HTML templates for all 5 review types\n- [Examples](examples\u002F) — 12 end-to-end flows (incl. inline confirmation, escalation, hybrid approval)\n- [Agent Implementation Checklist](agents\u002Fchecklist.md) — detailed agent guide with pseudocode\n- [Interactive Playground](playground\u002F)\n- [SDK Design Guide](docs\u002Fsdk-guide.md) — build a community SDK\n",{"name":5,"license":14,"metadata":23,"description":7,"compatibility":35},{"hitl":24,"version":33,"spec_url":34},{"info":25,"types":26,"supported":32},"Teaches the HITL Protocol itself — for building HITL services and HITL-aware agents.",[27,28,29,30,31],"approval","selection","input","confirmation","escalation",true,"0.6","https:\u002F\u002Fgithub.com\u002Frotorstar\u002Fhitl-protocol\u002Fblob\u002Fmain\u002Fspec\u002Fv0.6\u002Fhitl-protocol.md",[36,37,38,39,40,41],"claude","codex","gemini","openclaw","goose","copilot","main","54afe4b75ed2eb8f0feabb2f5b57dfa4bcbb3c44",".agents\u002Fskills\u002Fhitl-protocol","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal","https:\u002F\u002Fgithub.com\u002Fmeghal86","2026-05-17 14:11:28",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":32},[50,53,56],{"tool":51,"command":52},"npx","npx skills add meghal86\u002Fstacksignal --skill hitl-protocol",{"tool":54,"command":55},"bunx","bunx skills add meghal86\u002Fstacksignal --skill hitl-protocol",{"tool":57,"command":58},"pnpm","pnpm dlx skills add meghal86\u002Fstacksignal --skill hitl-protocol","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fhitl-protocol\u002FSKILL.md",[61,67,71,75],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"_meta.json","REFERENCE","参考文档",337,"https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fhitl-protocol\u002F_meta.json",{"path":68,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":69,"sourceHtmlUrl":70},"skills\u002FREADME.md",2050,"https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fhitl-protocol\u002Fskills\u002FREADME.md",{"path":72,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":73,"sourceHtmlUrl":74},"skills\u002Freferences\u002Fagent-integration.md",18019,"https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fhitl-protocol\u002Fskills\u002Freferences\u002Fagent-integration.md",{"path":76,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":77,"sourceHtmlUrl":78},"skills\u002Freferences\u002Fservice-integration.md",17563,"https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fhitl-protocol\u002Fskills\u002Freferences\u002Fservice-integration.md",[80,90,98,106,114,121],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":84,"licenseFileUrl":85,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":89},"01M78XH0FRP65NYEDHF2BT7NB1","zvukogram","Text-to-Speech via Zvukogram API with SSML support. Use when you need to generate speech from text, create podcasts, voice notifications, or work with audio. Supports speed control, stress marks, English word transcription, and audio fragment merging.","MIT","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzvukogram\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzvukogram\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":84,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":89},"01M78XEND5ASXYB6MN8AQQGJAF","zohomail","Zoho Mail API integration with managed OAuth. Send, receive, and manage emails, folders, and labels.\nUse this skill when users want to send emails, read messages, manage folders, or work with email labels in Zoho Mail.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzohomail\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzohomail\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":84,"licenseFileUrl":102,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":89},"01M78XEBBV3C6DRZFAJXP6RDKS","zoho-recruit","Zoho Recruit API integration with managed OAuth. Manage candidates, job openings, interviews, and recruitment workflows.\nUse this skill when users want to read, create, update, or search recruitment data like candidates, job openings, interviews, and applications in Zoho Recruit.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-recruit\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-recruit\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":84,"licenseFileUrl":110,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":89},"01M78XE5CQG75DZWYSKGXFR99T","zoho-people","Zoho People API integration with managed OAuth. Manage employees, departments, designations, attendance, and leave.\nUse this skill when users want to read, create, update, or query HR data like employees, departments, designations, and forms in Zoho People.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-people\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-people\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":84,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":89},"01M78XDZKMZAJYFJJFT7MR5ZN2","zoho-mail","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-mail\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-mail\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":84,"licenseFileUrl":125,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":89},"01M78XDST8JK0WVDA1F3VPNWXD","zoho-inventory","Zoho Inventory API integration with managed OAuth. Manage items, sales orders, invoices, purchase orders, bills, contacts, and shipments.\nUse this skill when users want to read, create, update, or delete inventory items, sales orders, invoices, purchase orders, bills, or other inventory records in Zoho Inventory.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-inventory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-inventory\u002FSKILL.md",[],[]]