b91ef04ab0
- Server: chat ntfy messages carry a sequence id derived from their app id; clearing a chat app notification also clears it in ntfy (PUT /<topic>/<seq>/clear, verified on ntfy v2.38.1). - Server: a turn that sent an agent notify does not also send chat_reply. - notify tool and MCP instructions: Pipelines already notifies at reply end and for questions/approvals; notify is for mid-turn or background news. - Shown notify items carry channels (apps/phone); the transcript row says where it went. - App: NotificationBridge.close(tag); web closes tracked Notifications and tells other tabs over a BroadcastChannel; native bridge cancels by tag and now supports macOS. AgentNotices closes on notifications_cleared and on resubscribe cleared ids, and a tap sends clear_notifications. - Docs: skill, chat reference, ntfy/notifications docs, app note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
57 lines
3.9 KiB
Markdown
57 lines
3.9 KiB
Markdown
# Working in a Pipelines chat
|
|
|
|
A Pipelines chat runs on OpenCode, Claude Code or Codex. The operator reads it in
|
|
the Pipelines app (desktop, web or phone), often not at this machine's terminal.
|
|
|
|
## Pipelines tools (`pipelines` MCP server)
|
|
|
|
Each call adds a persisted item to the transcript and returns one short line; a
|
|
refusal comes back as an error with the reason. Paths must resolve inside the
|
|
operator's home (absolute, `~/...`, or relative to the chat's directory).
|
|
|
|
| Tool | Arguments | Use for |
|
|
| --- | --- | --- |
|
|
| `show_file` | `path`, `title?` | Any file the operator should see: images inline, other files as a preview card. Use instead of naming a path. |
|
|
| `show_image` | `url_or_path`, `title?`, `alt?` | A home `image/*` file or an `https://` URL (no credentials, at most 2048 chars). |
|
|
| `show_html` | `html`, `title?`, `height_hint?` (120-600) | Self-contained HTML/SVG: diagrams, charts, tables. Sandboxed: no JavaScript, no network; inline CSS/SVG, `<details>`, `:hover`. Refused above 512 KiB. |
|
|
| `show_diff` | `path?`, `base?`, `committed_only?`, `title?` | A Git diff card when the operator asks to see the changes, or before submitting a pull request. No `base`: uncommitted work (staged, unstaged, untracked) against HEAD. `base` (e.g. `main`): everything since the merge base, which is what a PR contains, plus uncommitted work unless `committed_only`. Pipelines runs Git; do not paste the diff. |
|
|
| `notify` | `title`, `message`, `priority?` | A notification on every Pipelines app the operator is signed in to (web tabs, desktop, Android) and their phone (ntfy); a tap opens this chat. Opening the chat, or tapping or dismissing it on any device, clears it on all of them. Pipelines already notifies when the reply ends and for questions and approvals, so use it only for news mid-turn or after background work the turn does not wait for; a turn that notified sends no separate "replied" notification. 5 per minute per chat; the result says where it went, and undelivered sends report why. |
|
|
|
|
`show_diff` lists at most 300 files; a file patch over 256 KiB or a total over
|
|
1 MiB is shown partially and says so; binaries have no patch; renames show as
|
|
delete plus add. `base` is a plain revision name. Tools are absent when the
|
|
harness could not register them (logged); then name paths instead.
|
|
|
|
## References sent into the chat
|
|
|
|
The operator can send a run, a pipeline or a run artifact to a chat. It arrives
|
|
in the composer draft as text naming the run id, title, pipeline/version and,
|
|
for an artifact, stage, visit and a readable URL. Treat it as a pointer: read
|
|
`pipelines inspect RUN_ID --json` (or `pipelines show NAME --version N`) for the
|
|
authoritative record before acting.
|
|
|
|
## Questions and approvals
|
|
|
|
Claude Code questions appear as a form. The operator may pick an option, answer
|
|
in their own words, or dismiss it; a dismissal arrives as a denial saying they
|
|
will reply in the chat, so wait for that message. Question text, descriptions
|
|
and option descriptions render Markdown.
|
|
|
|
## Chat protocol (via `pipelines rpc -`)
|
|
|
|
Only when the user asks to drive another chat. Envelopes carry `type` and `id`:
|
|
|
|
- `chat_sessions`: the operator's chats (`id`, `directory`, `title`, `backend`).
|
|
- `chat_prompt` with `chat_prompt: {session_id, text, send_at?}`: sends a
|
|
prompt (at most 64 KiB). A busy chat queues it durably, in order, across
|
|
restarts. `send_at` (epoch milliseconds, future) holds it until that time;
|
|
prompts queued after it wait behind it.
|
|
- `chat_unqueue` with `chat_unqueue: {session_id, operation_id}` removes a
|
|
prompt not yet delivered.
|
|
- `chat_interrupt` with `chat_query: {session_id}` stops the current turn;
|
|
`chat_stop_tasks` (same body) stops background tasks without interrupting it.
|
|
|
|
Chat sessions are separate from pipeline run sessions; `pipelines chat-adopt
|
|
SESSION_ID [--harness opencode|claude|codex]` brings an existing harness session
|
|
into the chat list. Do not keep using an adopted session elsewhere.
|