Merge branches 'worktree-agent-a752b94716f8d18ba' and 'worktree-agent-a253f0d23f8cafea3' into worktree-agent-a96b82d1c1cee18ca
This commit is contained in:
@@ -90,9 +90,11 @@ only when asked). Stage use: `references/format.md`.
|
||||
## In a Pipelines chat
|
||||
|
||||
A chat's agent has a `pipelines` MCP server: `show_file`, `show_image`,
|
||||
`show_html` (follows the light/dark theme when it styles for dark), `show_diff` (show the
|
||||
`show_html` (follows the light/dark theme when it styles for dark; its result warns about blocked scripts or remote resources), `show_diff` (show the
|
||||
operator changes, e.g. before a pull request; `head`, `paths`), `show_run` (a
|
||||
live run card), `schedule_followup` (come back to this chat later) and `notify`
|
||||
live run card), `schedule_followup` (come back to this chat at a time, or when a
|
||||
run finishes or needs the operator: `run_id` with `on`; returns an id for
|
||||
`cancel_followup`) and `notify`
|
||||
(every Pipelines app the operator is signed in to plus their phone; cleared
|
||||
everywhere once they read it or open the chat). Pipelines already notifies when
|
||||
a reply ends or the agent asks something, so `notify` is only for news mid-turn
|
||||
|
||||
@@ -21,10 +21,11 @@ regenerate, or a file you rewrote.
|
||||
| --- | --- | --- |
|
||||
| `show_file` | `path`, `title?`, `replace?` | Any file the operator should see: images inline, other files as a preview card. Use instead of naming a path. A file up to 5 MiB is copied when shown, so the card keeps that version; a larger one stays linked and its card says "changed since shown" or "no longer exists". |
|
||||
| `show_image` | `url_or_path`, `title?`, `alt?`, `replace?` | A home `image/*` file, or an `https://` URL that Pipelines downloads and keeps (public hosts only, PNG/JPEG/GIF/WebP/AVIF/BMP, at most 10 MiB, no credentials, no redirect to plain http). A failed download is an error and nothing is shown. |
|
||||
| `show_html` | `html`, `title?`, `height_hint?` (120-600), `replace?` | Self-contained HTML/SVG: diagrams, charts, tables. Sandboxed: no JavaScript, no network; inline CSS/SVG, `<details>`, `:hover`. Follows the operator's light/dark theme only when it declares dark support: `@media (prefers-color-scheme: dark)`, `color-scheme` or `light-dark()`; anything else is always shown light, on white. Refused above 512 KiB. |
|
||||
| `show_html` | `html`, `title?`, `height_hint?` (120-600), `replace?` | Self-contained HTML/SVG: diagrams, charts, tables. Sandboxed: no JavaScript, no network; inline CSS/SVG, `<details>`, `:hover`. Follows the operator's light/dark theme only when it declares dark support: `@media (prefers-color-scheme: dark)`, `color-scheme` or `light-dark()`; anything else is always shown light, on white. The result warns when the document has scripts or loads remote resources (both blocked) or lacks dark support; fix and `replace`. Refused above 512 KiB. |
|
||||
| `show_diff` | `path?`, `base?`, `head?`, `paths?`, `committed_only?`, `title?`, `replace?` | 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`. `head` (e.g. `pipelines/run-123`): that revision instead of the work tree, against `base` or HEAD. `paths`: repository-relative files, directories or globs (`*.go`), at most 50. Pipelines runs Git; do not paste the diff. |
|
||||
| `show_run` | `run_id`, `title?`, `replace?` | A live card for a run: pipeline, title, status, current stage, duration; it updates as the run progresses and opens the run when tapped. |
|
||||
| `schedule_followup` | `message`, `at?` or `after_minutes?` | Queue a prompt to yourself in this chat, 1 minute to 7 days ahead (`at` is RFC 3339). It is a scheduled message from "Agent follow-up" the operator can remove; it does not hold the operator's own messages back, and is delivered when the chat is free at that time. At most 3 pending per chat. Do not wait for it in the current turn. |
|
||||
| `schedule_followup` | `message`, and `at?` or `after_minutes?`, or `run_id?` with `on?` | Queue a prompt to yourself in this chat: 1 minute to 7 days ahead (`at` is RFC 3339), or when run `run_id` reaches `on`: `finished` (default; it ended) or `attention` (it waits on a human decision, or ended), delivered after 7 days at the latest with the run's state appended. A run that already meets `on` is refused (act on it now). It is a scheduled message from "Agent follow-up" the operator can remove; it does not hold the operator's own messages back, and is delivered when the chat is free. At most 3 pending per chat. The result names the follow-up id and lists the pending ones. Do not wait for it in the current turn. |
|
||||
| `cancel_followup` | `id` | Remove one of this chat's undelivered follow-ups by the id `schedule_followup` returned; the result lists those still pending. |
|
||||
| `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
|
||||
@@ -43,10 +44,13 @@ 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.
|
||||
A question the agent asks appears as a form on every harness: Claude Code's
|
||||
AskUserQuestion, OpenCode's question tool, and Codex's request for user input
|
||||
(and MCP elicitations). The operator may pick an option, answer in their own
|
||||
words, or dismiss it. On Claude Code a dismissal arrives as a denial saying
|
||||
they will reply in the chat; on OpenCode, and for Codex elicitations, it cancels the question.
|
||||
Either way, wait for their message. Question text, descriptions and option
|
||||
descriptions render Markdown.
|
||||
|
||||
## Chat protocol (via `pipelines rpc -`)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user