Skip to content

getaero-io/gtm-eng-skills / skills/deepline-gtm

deepline-gtm

Unverified

GTM leads, enrichment, outreach, Plays, developer signals/Reo.dev. Providers: adyntel,affinity,ai_ark,akta,allegrow,amplemarket,apify,attention,attio,aviato,bettercontact,bigquery,bluesky,bounceban,brave,browserbase,builtwith,buyercaddy,cbinsights,clay,clickhouse,close,cloudflare,contactout,contextdev,crunchbase,crustdata-v3,customer_db,databricks,dataforseo,datagma,dealroom,deepline_ip_to_company,deepline_native,deeplineagent,deepseek,discolike,dnb,edges,emailbison,emailguard,enformion,enigma,exa,findymail,firecrawl,fireflies,firmable,forager,fullenrich,fundable,generic_http,getleads,gong,google_ads_audiences,google_workspace,govfiles,grain,hackernews,harvestapi,heyreach,hubspot,hunter,icypeas,instantly,intercom,ipqs,kaspr,kernel,kickbox,leadmagic,lemlist,limadata,linkedin_ads_audiences,luma,lusha,meerapi,meta_audiences,millionverifier,nooks,notion,openmart,opensosdata,openwebninja,outreach,parallel,particle,peopledatalabs,pitchbook,podscan,polymarket,postgres,predictleads,prospeo,quickenrich,rapidapi,….

FileKindSize
SKILL.mdskill md15.9 KB
claude-deepline-statusline.mjsexecutablescript25.0 KB
prompts.jsonconfig297.9 KB
provider-playbooks/adyntel.mdmarkdown1.2 KB
provider-playbooks/affinity.mdmarkdown825 B
provider-playbooks/ai-ark.mdmarkdown10.6 KB
provider-playbooks/akta.mdmarkdown1.5 KB
provider-playbooks/allegrow.mdmarkdown4.6 KB
provider-playbooks/amplemarket.mdmarkdown2.8 KB
provider-playbooks/apify.mdmarkdown1.8 KB
provider-playbooks/attention.mdmarkdown449 B
provider-playbooks/attio.mdmarkdown5.6 KB
provider-playbooks/aviato.mdmarkdown756 B
provider-playbooks/bettercontact.mdmarkdown1.7 KB
provider-playbooks/bigquery.mdmarkdown1019 B
provider-playbooks/bloomberry.mdmarkdown935 B
provider-playbooks/bluesky.mdmarkdown139 B
provider-playbooks/bounceban.mdmarkdown1.6 KB
provider-playbooks/brave.mdmarkdown422 B
provider-playbooks/browserbase.mdmarkdown1.0 KB
provider-playbooks/builtwith.mdmarkdown1.0 KB
provider-playbooks/buyercaddy.mdmarkdown2.3 KB
provider-playbooks/cbinsights.mdmarkdown436 B
provider-playbooks/clay.mdmarkdown875 B
provider-playbooks/clickhouse.mdmarkdown1.1 KB
provider-playbooks/close.mdmarkdown2.6 KB
provider-playbooks/cloudflare.mdmarkdown2.3 KB
provider-playbooks/contactout.mdmarkdown8.3 KB
provider-playbooks/contextdev.mdmarkdown582 B
provider-playbooks/crunchbase.mdmarkdown742 B
provider-playbooks/crustdata-v2.mdmarkdown490 B
provider-playbooks/crustdata-v3.mdmarkdown8.4 KB
provider-playbooks/crustdata.mdmarkdown6.8 KB
provider-playbooks/databricks.mdmarkdown3.5 KB
provider-playbooks/dataforseo.mdmarkdown950 B
provider-playbooks/datagma.mdmarkdown6.0 KB
provider-playbooks/dealroom.mdmarkdown632 B
provider-playbooks/deepline-ip-to-company.mdmarkdown480 B
provider-playbooks/deepline-native-osint.mdmarkdown1.5 KB
provider-playbooks/deepline-native.mdmarkdown25.1 KB
provider-playbooks/deeplineagent.mdmarkdown2.7 KB
provider-playbooks/deepseek.mdmarkdown1.2 KB
provider-playbooks/discolike.mdmarkdown6.2 KB
provider-playbooks/dnb.mdmarkdown1.4 KB
provider-playbooks/dropleads.mdmarkdown10.2 KB
provider-playbooks/edges.mdmarkdown875 B
provider-playbooks/emailbison.mdmarkdown634 B
provider-playbooks/emailguard.mdmarkdown243 B
provider-playbooks/enformion.mdmarkdown9.3 KB
provider-playbooks/enigma.mdmarkdown1.7 KB
provider-playbooks/exa.mdmarkdown1.4 KB
provider-playbooks/file-transport.mdmarkdown739 B
provider-playbooks/findymail.mdmarkdown880 B
provider-playbooks/firecrawl.mdmarkdown2.4 KB
provider-playbooks/fireflies.mdmarkdown988 B
provider-playbooks/firmable.mdmarkdown1.3 KB
provider-playbooks/forager.mdmarkdown2.3 KB
provider-playbooks/fullenrich.mdmarkdown2.1 KB
provider-playbooks/fundable.mdmarkdown2.0 KB
provider-playbooks/generic-http.mdmarkdown348 B
provider-playbooks/getleads.mdmarkdown2.2 KB
provider-playbooks/gong.mdmarkdown488 B
provider-playbooks/google-ads-audiences.mdmarkdown2.0 KB
provider-playbooks/google-calendar-availability.mdmarkdown1.6 KB
provider-playbooks/google-calendar.mdmarkdown1.1 KB
provider-playbooks/google-sheets.mdmarkdown842 B
provider-playbooks/google-workspace.mdmarkdown2.1 KB
provider-playbooks/govfiles.mdmarkdown1.8 KB
provider-playbooks/grain.mdmarkdown1.0 KB
provider-playbooks/hackernews.mdmarkdown208 B
provider-playbooks/harvestapi.mdmarkdown3.5 KB
provider-playbooks/heyreach.mdmarkdown1.6 KB
provider-playbooks/hubspot.mdmarkdown3.3 KB
provider-playbooks/hunter.mdmarkdown849 B
provider-playbooks/icypeas.mdmarkdown1.8 KB
provider-playbooks/instantly.mdmarkdown1.6 KB
provider-playbooks/integration-operation.mdmarkdown704 B
provider-playbooks/intercom.mdmarkdown275 B
provider-playbooks/ipqs.mdmarkdown1.7 KB
provider-playbooks/kaspr.mdmarkdown822 B
provider-playbooks/kernel.mdmarkdown875 B
provider-playbooks/leadmagic.mdmarkdown5.3 KB
provider-playbooks/lemlist.mdmarkdown7.5 KB
provider-playbooks/limadata.mdmarkdown636 B
provider-playbooks/linkedin-ads-audiences.mdmarkdown629 B
provider-playbooks/luma.mdmarkdown3.2 KB
provider-playbooks/lusha.mdmarkdown3.5 KB
provider-playbooks/meerapi.mdmarkdown1.2 KB
provider-playbooks/meta-audiences.mdmarkdown4.8 KB
provider-playbooks/millionverifier.mdmarkdown618 B
provider-playbooks/nooks.mdmarkdown1.0 KB
provider-playbooks/notion.mdmarkdown724 B
provider-playbooks/openmart.mdmarkdown2.3 KB
provider-playbooks/opensosdata.mdmarkdown4.0 KB
provider-playbooks/openwebninja.mdmarkdown315 B
provider-playbooks/outreach.mdmarkdown2.6 KB
provider-playbooks/parallel.mdmarkdown4.4 KB
provider-playbooks/particle.mdmarkdown2.0 KB
provider-playbooks/peopledatalabs.mdmarkdown4.5 KB
provider-playbooks/pipedrive.mdmarkdown582 B
provider-playbooks/pitchbook.mdmarkdown606 B
provider-playbooks/podscan.mdmarkdown2.7 KB
provider-playbooks/polymarket.mdmarkdown2.2 KB
provider-playbooks/postgres.mdmarkdown553 B
provider-playbooks/predictleads.mdmarkdown622 B
provider-playbooks/prospeo.mdmarkdown2.4 KB
provider-playbooks/quickenrich.mdmarkdown595 B
provider-playbooks/rapidapi.mdmarkdown2.5 KB
provider-playbooks/rb2b.mdmarkdown247 B
provider-playbooks/redshift.mdmarkdown763 B
provider-playbooks/reo-write.mdmarkdown1.6 KB
provider-playbooks/reo.mdmarkdown2.0 KB
provider-playbooks/resend.mdmarkdown3.6 KB
provider-playbooks/salesforce.mdmarkdown3.6 KB
provider-playbooks/salesforge.mdmarkdown274 B
provider-playbooks/salesloft.mdmarkdown1.0 KB
provider-playbooks/scrapecreators.mdmarkdown3.4 KB
provider-playbooks/searchbug.mdmarkdown637 B
provider-playbooks/sec-edgar.mdmarkdown1.6 KB
provider-playbooks/sentrion.mdmarkdown737 B
provider-playbooks/serper.mdmarkdown1011 B
provider-playbooks/slack.mdmarkdown21.1 KB
provider-playbooks/smartleads.mdmarkdown11.8 KB
provider-playbooks/snitcher.mdmarkdown302 B
provider-playbooks/snowflake.mdmarkdown768 B
provider-playbooks/socrata.mdmarkdown3.2 KB
provider-playbooks/sumble.mdmarkdown1.3 KB
provider-playbooks/tamradar.mdmarkdown1.4 KB
provider-playbooks/test-unhinted.mdmarkdown505 B
provider-playbooks/test.mdmarkdown254 B
provider-playbooks/theirstack.mdmarkdown4.4 KB
provider-playbooks/theswarm.mdmarkdown1.4 KB
provider-playbooks/treg.mdmarkdown1.5 KB
provider-playbooks/trestle.mdmarkdown3.7 KB
provider-playbooks/trykitt.mdmarkdown862 B
provider-playbooks/twitterapi.mdmarkdown3.6 KB
provider-playbooks/unipile.mdmarkdown4.8 KB
provider-playbooks/upcell.mdmarkdown715 B
provider-playbooks/vector.mdmarkdown257 B
provider-playbooks/versium.mdmarkdown690 B
provider-playbooks/wiza.mdmarkdown2.0 KB
provider-playbooks/wizleads.mdmarkdown1.1 KB
provider-playbooks/zerobounce.mdmarkdown1.3 KB
provider-playbooks/zoho-crm.mdmarkdown630 B
provider-playbooks/zoominfo.mdmarkdown1.2 KB
recipes/account-orgchart.mdmarkdown35.6 KB
recipes/build-tam.mdmarkdown3.7 KB
recipes/clay-to-deepline.mdmarkdown26.8 KB
recipes/deepline-monitors.mdmarkdown32.5 KB
recipes/developer-signals.mdmarkdown14.7 KB
recipes/find-qualified-titles.mdmarkdown5.2 KB
recipes/portfolio-prospecting.mdmarkdown3.6 KB
recipes/small-business-prospecting.mdmarkdown3.0 KB
references/clay-action-mappings.mdmarkdown40.0 KB
references/clay-api-surface.mdmarkdown18.6 KB
references/clay-extraction.mdmarkdown16.2 KB
references/industry-radars.mdmarkdown3.3 KB
references/monitor-contract-reference.mdmarkdown25.9 KB
references/monitor-operations.mdmarkdown12.4 KB
references/monitor-sdk.mdmarkdown3.2 KB
references/run-events.mdmarkdown14.3 KB
scripts/clay-extract-bookmarklet.jsscript10.5 KB
scripts/clay-extract-bookmarklet.url.txtmarkdown8.2 KB
scripts/clay-extract.pyscript17.9 KB
scripts/clay-har-miner.pyscript5.8 KB
scripts/clay-to-deepline.mjsscript134.1 KB
scripts/contact-accuracy-audit.pyscript8.9 KB
scripts/fixtures_contact_accuracy_audit.jsonconfig5.5 KB
scripts/fixtures_current_role.jsonconfig10.3 KB
scripts/flatten-search-contact-persons.pyscript3.3 KB
scripts/select-current-role.pyscript12.2 KB
scripts/validate-emails.pyexecutablescript2.0 KB
skill-metadata.jsonconfig2.2 KB
writing-outreach.mdmarkdown14.1 KB

provider-playbooks/slack.md

View on GitHub
<!-- skill-tool-field: slack_channel_id -- Slack metadata property returned with the HITL event payload, not a tool ID. -->

<!-- skill-tool-field: slack_user_id -- Slack metadata property returned with the HITL event payload, not a tool ID. -->

<!-- skill-tool-field: slack_user_name -- Slack metadata property returned with the HITL event payload, not a tool ID. -->

# slack_message_with_hitl — Agent Guidance

## Native Slack fields and methods

Use `slack_post_message` and `slack_update_message` for ordinary messaging.
They retain new top-level fields and additive fields inside known Block Kit
objects; known field validation still provides early errors. Use
`slack_api_call` with `{ "method": "chat.update", "params": { ... } }` when
Slack's method or content contract is newer than the local schemas. Its
argument object passes through without a Slack field allowlist, and its
description is available through the same `deepline search` / `deepline describe`
discovery path. Authentication still comes from the workspace connection.

For `slack_api_call` in Plays, use a stable `id` per intended operation.
No `force` flag is needed: every logical invocation has its own result receipt
and provider operation identity. Restoring identical blocks after a loading
update executes again; deterministic replay reuses that invocation's receipt.
Existing named tools retain their historical payload-based cache behavior.

Native API calls do not create human-action waits. For the compact managed
HITL card, keep using `slack_message_with_hitl`; its current inputs and outputs
remain supported. For a Play that owns a full Block Kit layout and needs
multiple Slack-native buttons or repeated rich-card revisions, use
`slack_wait_for_action` (inspect with `deepline tools describe slack_wait_for_action`). It posts or updates one
message revision, waits for one button, returns the original Slack `action_id`
and `value`, and lets the Play replace that same card and wait again. It is
optional; it does not replace or deprecate the managed HITL tool.

In a Play, ordinary Slack post/update tools do not install a listener for their
buttons. `deepline plays check` rejects statically visible callback controls
sent that way in authoring edition 8 and later; editions 2–7 warn and edition 1
keeps its legacy validation path. It also warns when it cannot inspect a
dynamic layout. For repeated decisions, consume the
`slack_wait_for_action` result, use a finite retry limit, and pass the prior
message reference to replace and re-arm that same card.

## Files and full Slack API access

Use `slack_upload_file` for attachments. Its fields follow Slack's `filesUploadV2`: use top-level `content` for a text file, `file` for a value to turn into a file, or `file_uploads` to send a batch. `content` is suitable for CSV, HTML, JSON, Markdown, and text. A JSON `file` value is serialized as JSON. Pass a Dataset Handle directly as `file` in a Play and Deepline materializes the full completed dataset as CSV; outside a Play, use `{ "run_id", "path"?, "dataset_id"? }` as the `file` value. Never build a CSV from a handle's bounded preview.

The Slack connection needs the optional `files:write` and `files:read` bot scopes. `files:read` lets Deepline reconcile a lost upload-finalization response with Slack instead of risking a duplicate attachment. If the integration was connected before those scopes were selected, reconnect it. Attachments are limited to 25 MiB. Dataset Handle CSV exports keep the first 50,000 rows, first 500 columns, and only complete rows that fit the byte limit; successful bounded exports report omissions in `meta.file_transport`.

```json
{
  "channel_id": "C0123456789",
  "file": {
    "run_id": "play/account-research/run/run_123",
    "path": "result.accounts"
  },
  "filename": "qualified-accounts.csv",
  "initial_comment": "Accounts ready for review."
}
```

Use `thread_ts` with `channel_id` to attach a file to a parent thread. Slack ignores `blocks` when `initial_comment` is present, matching Slack's API behavior.

`slack_post_message` stays a direct `chat.postMessage` wrapper. Use `slack_upload_file` when a message needs an attachment; it accepts `blocks`, `initial_comment`, and channel/thread destinations on Slack's external-upload completion call.

## Managed HITL card behavior

Posts a message to Slack with buttons you define, pauses the workflow, and resumes when a human clicks a button. Use it whenever a workflow needs a human decision before proceeding.

## Mental model

1. You define **what the human sees** (text, optional blocks, + buttons) and **what data each button carries** (emit).
2. The system posts the message, pauses the workflow, and waits.
3. A human clicks a button.
4. The workflow resumes. The next step receives `selected_option` (the button id) and `event_payload` (the button's emit data merged with Slack metadata).

That's it. One input, one pause, one output.

## Update and re-arm a managed HITL card

Each call still consumes exactly one click. To let a Play offer another choice
after it handles that click, pass the prior result's `message_ref` to the next
`slack_message_with_hitl` call. Deepline updates that Slack message in place
and installs fresh callback data for the next wait; it does not create a new
card or run an automatic retry loop. Supply a different, stable `signal` for
each interaction cycle so late or duplicate clicks cannot resolve a later
wait.

```json
{
  "channel": "C0123456789",
  "text": "No phone was found. Try another source?",
  "message_ref": {
    "channel": "C0123456789",
    "ts": "1712501111.000100"
  },
  "signal": "phone-waterfall-retry-2",
  "buttons": [
    { "id": "retry", "label": "Retry lookup", "style": "primary" },
    { "id": "stop", "label": "Stop" }
  ]
}
```

Use `message_ref` returned by the previous HITL call and a new stable signal
for every subsequent wait. The Slack connection must be able to update the
original bot-authored message. Without `message_ref`, the tool keeps its normal
behavior and posts a new card.

While a Play resumes, the callback preserves the rich content and replaces
consumed buttons with a processing indicator. The Play can then replace the
whole layout with `slack_api_call` / `chat.update` and re-arm the next decision.
Legacy workflow callbacks retain their historical resolved-card rendering.

## Managed phone-waterfall pattern

Use `slack_wait_for_action` for a Play-owned review round, then update the
same message using its returned `message_ref`. Keep a finite retry limit and
an explicit terminal state for retry, stop, and timeout decisions.

The native wait/resume boundary does not yet consistently attach
`toolResponse.rawV2`. Do not assume the ordinary provider-response envelope
for its action result or copy a provider extraction example into this path.
Inspect an existing internal fixture and its declared contract before revising
a deployed review Play. Canonical extraction examples can be added once this
boundary supplies `rawV2` on live and resumed execution.

## Blocks for `slack_message_with_hitl` (Block Kit)

You can provide custom Slack Block Kit blocks to control the message layout. When `blocks` is provided, it replaces the default section block generated from `text`. The system always appends:

- A **status context block** (hourglass / checkmark)
- An **actions block** with your buttons (injected with routing metadata)

**Do NOT include `actions` blocks** in a `slack_message_with_hitl` call — its
interactive buttons are managed via the `buttons` field. For a Play that needs
native Block Kit buttons, use `slack_wait_for_action` (inspect with `deepline tools describe slack_wait_for_action`)
instead; it preserves the whole rich card, returns native action IDs/values,
and re-arms the same message on each call.

When `blocks` is provided, `text` is still required — Slack uses it as the notification preview and accessibility fallback.

### Example with blocks

```json
{
  "channel": "C0123456789",
  "text": "New lead: Sarah Chen, VP Marketing at Stripe",
  "blocks": [
    {
      "type": "header",
      "text": { "type": "plain_text", "text": "New Lead for Review" }
    },
    {
      "type": "section",
      "fields": [
        { "type": "mrkdwn", "text": "*Name:*\nSarah Chen" },
        { "type": "mrkdwn", "text": "*Title:*\nVP Marketing" },
        { "type": "mrkdwn", "text": "*Company:*\nStripe" },
        { "type": "mrkdwn", "text": "*Email:*\nsarah@stripe.com" }
      ]
    },
    { "type": "divider" }
  ],
  "buttons": [
    {
      "id": "approve",
      "label": "Approve",
      "style": "primary",
      "emit": { "decision": "approved" }
    },
    {
      "id": "reject",
      "label": "Reject",
      "style": "danger",
      "emit": { "decision": "rejected" }
    }
  ],
  "allow_edit": true
}
```

### Supported block types

Known Block Kit types have field guidance and additive-field passthrough:
`section`, `header`, `divider`, `context`, `image`, `rich_text`, `actions`
(non-HITL only), `input`, `video`, `table`, `markdown`, `file`,
`context_actions`, `task_card`, and `plan`. Unknown block types also pass
through. Slack decides whether a block is valid on the selected surface.

See the [Block Kit reference](https://docs.slack.dev/reference/block-kit/blocks) for full specifications.

## Button schema

```json
{
  "buttons": [
    {
      "id": "hubspot",
      "label": "Push to HubSpot",
      "style": "primary",
      "emit": { "crm": "hubspot", "action": "create_contact" }
    },
    {
      "id": "skip",
      "label": "Skip",
      "style": "danger"
    }
  ]
}
```

Each button has:

| Field   | Required | Description                                                                                   |
| ------- | -------- | --------------------------------------------------------------------------------------------- |
| `id`    | yes      | Unique identifier. Returned as `selected_option` when clicked. Cannot be `"edit"` (reserved). |
| `label` | yes      | Text shown on the button in Slack.                                                            |
| `style` | no       | `"primary"` (green) or `"danger"` (red). Omit for neutral gray.                               |
| `emit`  | no       | Arbitrary key-value data merged into `event_payload` when this button is clicked.             |

Rules:

- 1–5 buttons required.
- Button ids must be unique.
- `"edit"` is a reserved id — use `allow_edit` instead.
- Unknown fields on buttons are rejected (`additionalProperties: false`).

## What the next step receives

When a human clicks a button, the workflow resumes with this output:

```json
{
  "resumed": true,
  "timed_out": false,
  "selected_option": "hubspot",
  "event_payload": {
    "crm": "hubspot",
    "action": "create_contact",
    "selected_option": "hubspot",
    "slack_user_id": "U0123456789",
    "slack_channel_id": "C0123456789"
  },
  "final_text": "Lead: Sarah Chen, VP Marketing at Stripe",
  "edited": false,
  "signal": "workflow:run_1:block_2:slack:hitl",
  "actor": {
    "slack_user_id": "U0123456789",
    "slack_channel_id": "C0123456789"
  },
  "message_ref": {
    "channel": "C0123456789",
    "ts": "1712501111.000100"
  }
}
```

- `selected_option` — the `id` of the button that was clicked.
- `event_payload` — the button's `emit` data merged with Slack signal metadata (`selected_option`, `final_text`, `edited`, `slack_user_id`, `slack_channel_id`, etc). If the button has no `emit`, event_payload only contains the signal metadata. **Merge precedence:** `emit` keys overwrite signal metadata keys on collision — avoid using `selected_option`, `final_text`, `edited`, `slack_user_id`, `slack_user_name`, `slack_channel_id`, or `state_values` as emit keys.
- `final_text` — the message text at the time of the click (may differ from the original if the human used Edit).
- `edited` — whether the human modified the draft text before clicking.
- `state_values` — Slack's `state.values` at the click, present when the card has `input` blocks: `block_id -> action_id -> element state`. Present in both the result and `event_payload`. It can be absent even after a click, when the Play resumes from the stored interaction record instead of the live click (for example, on a replay after a retry). Treat a missing value as unknown, not as unedited.
- `slack_user_name` — the clicker's Slack handle. Use `slack_get_user` with `slack_user_id` for a display or real name.

## Inline input blocks

To let a reviewer edit text in the card itself, without the Edit modal, add an `input` block to `blocks`. Set explicit `block_id` and `action_id` so the value is easy to read:

```json
{
  "type": "input",
  "block_id": "draft",
  "label": { "type": "plain_text", "text": "Draft" },
  "element": {
    "type": "plain_text_input",
    "action_id": "draft_text",
    "multiline": true,
    "initial_value": "Hi Sarah, ..."
  }
}
```

When the reviewer clicks a button, read the typed text at `state_values.draft.draft_text.value`. If `state_values` is missing, do not fall back to sending the original draft; stop or ask again. `final_text` and `edited` still describe only the `text` draft and the Edit modal; they do not change for inline inputs.

Branch on `selected_option` in the next workflow step to decide what to do.

## allow_edit

Set `"allow_edit": true` to add an Edit button that opens a Slack modal where the human can modify the `text` field. Editing does NOT resume the workflow — the human must still click one of your defined buttons after editing.

Defaults to `false`. Use it when the `text` field contains a draft the human should be able to revise (e.g., a draft email, a message template).

## post_interaction

Controls the post-click message for legacy workflow waits. Play event waits
immediately show a processing state while the Play resumes; the Play can then
update and re-arm the same card with `message_ref`:

```json
{
  "post_interaction": {
    "disable_buttons": true,
    "replace_message": "Decision recorded."
  }
}
```

- `disable_buttons` — remove all buttons from the message after a click (default: true).
- `replace_message` — replace the entire message text with this string.
- `replace_blocks` — replace the entire message with custom Slack blocks (advanced).

This applies to all buttons. There is no per-button `post_interaction`.

## Timeout and continuation

The new `timeout: null` and `on_timeout_mode` options apply to Play calls through `deepline.tools.execute`. Legacy workflow blocks retain their existing timeout contract and reject these new options before posting a card.

```json
{
  "timeout": "30m",
  "on_timeout_mode": "continue"
}
```

Controls what happens when nobody clicks a button before the deadline:

- `timeout` — Optional deadline. A string duration like `"30m"`, `"2h"`, or `"7d"` keeps its existing meaning, including durations below one minute or above 30 days. `null` opts into a 30-day wait. Omitted keeps the artifact's edition-gated default (24h legacy / 7d current).
- `on_timeout_mode` — Explicit `"park"` keeps the Play paused after the card expires; explicit `"continue"` expires the card and returns `timed_out: true` and `message_ref` so your Play can handle the timeout. Omitted preserves the artifact's existing timeout policy, which parks by default. Both explicit modes take precedence over legacy settings.
- `timeout_emit` — Retained for compatibility and ignored by Play event waits. Timeout results have `event_payload: null`; branch on `timed_out`.

**Legacy fields** (`on_timeout`, `timeout_error`) retain their existing artifact-specific behavior when `on_timeout_mode` is omitted. They do not enable continuation in default parked artifacts. Already-armed waits retain their saved timeout policy on replay.

A timeout never selects an approval button. With `"continue"`, the tool call completes and subsequent code runs, so check `timed_out` before performing approval actions. `timeout: null` alone does not enable continuation.

### Persistent review queues with `timeout: null`

Set `timeout: null` for multi-day or persistent review queues where the card should remain active until a human acts (up to the 30-day platform ceiling):

```json
{
  "channel": "C0123456789",
  "text": "Contract review: $250k ACV deal with Acme Corp",
  "buttons": [
    { "id": "approve", "label": "Approve", "style": "primary" },
    { "id": "reject", "label": "Reject", "style": "danger" }
  ],
  "timeout": null
}
```

The card will not expire until someone clicks a button (or the 30-day platform ceiling is reached).

### Fallback logic with `on_timeout_mode: "continue"`

When you need to take action after a timeout (e.g., log a note, send a reminder, escalate), use `on_timeout_mode: "continue"`:

```json
{
  "channel": "C0123456789",
  "text": "Approve this vendor payment?",
  "buttons": [
    { "id": "approve", "label": "Approve", "style": "primary" },
    { "id": "deny", "label": "Deny", "style": "danger" }
  ],
  "timeout": "2h",
  "on_timeout_mode": "continue"
}
```

When the timeout fires, the tool response includes:

```json
{
  "resumed": false,
  "timed_out": true,
  "message_ref": {
    "channel": "C0123456789",
    "ts": "1712501111.000100"
  },
  "event_payload": null
}
```

Pass this input to `deepline.tools.execute` in a Play. In subsequent Play code, branch on the tool response's `timed_out` field: handle `true` as expiry, and only perform approval actions when `timed_out` is false and `selected_option` matches the approval button. A completed tool call alone is not proof of human approval.

The `message_ref` contains the channel and timestamp of the expired card, so you can reference it in follow-up actions (e.g., reply in thread, update the card, post a reminder).

### Update the original card after a fallback action

Use `slack_update_message` with the same Slack connection to replace the expired card with what happened next. After the HITL call returns `timed_out: true`, perform the fallback action and pass `message_ref.channel` and `message_ref.ts` to the update tool:

```json
{
  "channel": "C0123456789",
  "ts": "1712501111.000100",
  "text": "No response before the deadline. The lead was assigned to the default owner.",
  "blocks": [],
  "attachments": []
}
```

Use the returned message reference in place of the example IDs. Empty arrays remove the old layout and attachments; supply replacement blocks if you want a formatted summary. This tool uses `chat.update` with the connection's existing `chat:write` scope, so no separate Slack credential is needed. It can only edit messages authored by that bot, and cannot edit ephemeral messages. `post_interaction` configures button-click handling; use this update tool for custom timeout follow-up text.

## Common patterns

### Simple confirmation gate (1 button)

```json
{
  "channel": "C0123456789",
  "text": "About to enrich 500 leads. This will cost ~$25.",
  "buttons": [{ "id": "confirm", "label": "Go ahead", "style": "primary" }]
}
```

### Approve / reject with editable draft

```json
{
  "channel": "C0123456789",
  "text": "Hi John, we'd love to set up a call to discuss...",
  "buttons": [
    {
      "id": "approve",
      "label": "Send",
      "style": "primary",
      "emit": { "decision": "send" }
    },
    {
      "id": "reject",
      "label": "Drop",
      "style": "danger",
      "emit": { "decision": "drop" }
    }
  ],
  "allow_edit": true
}
```

### Multi-option CRM routing (5 buttons)

```json
{
  "channel": "C0123456789",
  "text": "New lead: Sarah Chen, VP Marketing at Stripe. Which CRM?",
  "buttons": [
    {
      "id": "hubspot",
      "label": "HubSpot",
      "style": "primary",
      "emit": { "crm": "hubspot" }
    },
    {
      "id": "salesforce",
      "label": "Salesforce",
      "emit": { "crm": "salesforce" }
    },
    { "id": "pipedrive", "label": "Pipedrive", "emit": { "crm": "pipedrive" } },
    { "id": "attio", "label": "Attio", "emit": { "crm": "attio" } },
    { "id": "skip", "label": "Skip Lead", "style": "danger" }
  ]
}
```

Next step branches: `if selected_option === "skip"` → end; otherwise `event_payload.crm` tells you which API to call.

## Qualify a lead and review an email draft

Build this flow in a TypeScript Play with two `slack_message_with_hitl` calls
and local TypeScript between them:

1. Ask the reviewer to classify the lead with hot, warm, and disqualify buttons.
   Carry the classification in each button's `emit` data and set an explicit
   timeout policy.
2. Inspect the completed interaction's `selected_option` and timeout result.
   Return a terminal skip result when the reviewer disqualifies the lead or
   the wait times out. Keep the original lead and decision as evidence.
3. Construct the email draft in local TypeScript from the chosen classification.
   Retain the draft in a variable for the next call.
4. Ask the reviewer to approve or drop that draft with a second HITL call.
   Pass the draft text directly as a typed value. Use `allow_edit: true` when
   the reviewer should be able to revise it, then read the approved `final_text`.
5. Handle drop and timeout as explicit terminal outcomes. Send an approved email
   only through the separately authorized outbound action.

Use the action's described result contract for each interaction. The button ID
is `selected_option`, button data is `event_payload`, and edited text is
`final_text`. Inspect the retained result before selecting an envelope path.
A completed tool call by itself does not mean the reviewer approved sending.
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall