@tickernelz/paperclip-pro-adapter-codex-local 2026.925.0 → 2026.925.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tickernelz/paperclip-pro-adapter-codex-local",
3
- "version": "2026.925.0",
3
+ "version": "2026.925.2",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/tickernelz/paperclip-pro",
6
6
  "bugs": {
@@ -39,8 +39,8 @@
39
39
  ],
40
40
  "dependencies": {
41
41
  "@agentclientprotocol/codex-acp": "^1.6.2",
42
- "@tickernelz/paperclip-pro-adapter-utils": "2026.925.0",
43
- "@tickernelz/paperclip-pro-shared": "2026.925.0",
42
+ "@tickernelz/paperclip-pro-adapter-utils": "2026.925.2",
43
+ "@tickernelz/paperclip-pro-shared": "2026.925.2",
44
44
  "picocolors": "^1.1.1"
45
45
  },
46
46
  "devDependencies": {
@@ -17,15 +17,45 @@ In Paperclip, **task** and **issue** refer to the same work item. The UI may use
17
17
 
18
18
  ## Authentication
19
19
 
20
- Env vars auto-injected: `PAPERCLIP_AGENT_ID`, `PAPERCLIP_COMPANY_ID`, `PAPERCLIP_API_URL`, `PAPERCLIP_RUN_ID`. Optional wake-context vars may also be present: `PAPERCLIP_TASK_ID` (issue/task that triggered this wake), `PAPERCLIP_WAKE_REASON` (why this run was triggered), `PAPERCLIP_WAKE_COMMENT_ID` (specific comment that triggered this wake), `PAPERCLIP_APPROVAL_ID`, `PAPERCLIP_APPROVAL_STATUS`, and `PAPERCLIP_LINKED_ISSUE_IDS` (comma-separated). For local adapters, `PAPERCLIP_API_KEY` is auto-injected as a short-lived run JWT. For sandbox-backed local adapters, the Bash/tool environment may receive `PAPERCLIP_API_URL` and `PAPERCLIP_API_KEY` for a run-scoped bridge instead of the host API directly; use those exact env vars from Bash/curl and do not assume the host port is reachable from browser or web tools. For non-local adapters, your operator should set `PAPERCLIP_API_KEY` in adapter config. All requests use `Authorization: Bearer $PAPERCLIP_API_KEY`. All endpoints are under `/api`. Use JSON except for multipart attachment uploads and binary content downloads. Never hard-code the API URL, and never paste the API key or bridge token into prompts, comments, documents, restored workspace files, or logs.
20
+ Env vars auto-injected: `PAPERCLIP_AGENT_ID`, `PAPERCLIP_COMPANY_ID`, `PAPERCLIP_RUN_ID`. Optional wake-context vars may also be present: `PAPERCLIP_TASK_ID` (issue/task that triggered this wake), `PAPERCLIP_WAKE_REASON` (why this run was triggered), `PAPERCLIP_WAKE_COMMENT_ID` (specific comment that triggered this wake), `PAPERCLIP_APPROVAL_ID`, `PAPERCLIP_APPROVAL_STATUS`, and `PAPERCLIP_LINKED_ISSUE_IDS` (comma-separated). For local adapters, `PAPERCLIP_API_KEY` is auto-injected as a short-lived run JWT; for non-local adapters, your operator should set it in adapter config. The `paperclip*` tools resolve the endpoint and the credential themselves. Never paste the API key or a bridge token into prompts, comments, documents, restored workspace files, or logs.
21
21
 
22
- Adapters deliver the wake payload in the run prompt. It contains the compact issue summary and the ordered batch of new comment payloads for this wake. Read that prompt section first. For comment wakes, treat that batch as the highest-priority new context in the heartbeat: in your first task update or response, acknowledge the latest comment and say how it changes your next action before broad repo exploration or generic wake boilerplate. Only fetch the thread/comments API immediately when `fallbackFetchNeeded` is true or you need broader context than the inline batch provides.
22
+ Adapters deliver the wake payload in the run prompt. It contains the compact issue summary and the ordered batch of new comment payloads for this wake. Read that prompt section first. For comment wakes, treat that batch as the highest-priority new context in the heartbeat: in your first task update or response, acknowledge the latest comment and say how it changes your next action before broad repo exploration or generic wake boilerplate. Only reach for the comment tools immediately when `fallbackFetchNeeded` is true or you need broader context than the inline batch provides.
23
23
 
24
24
  Manual local CLI mode (outside heartbeat runs): use `paperclip-pro agent local-cli <agent-id-or-shortname> --company-id <company-id>` to install Paperclip skills for Claude/Codex and print/export the required `PAPERCLIP_*` environment variables for that agent identity.
25
25
 
26
26
  **CLI safety — use `npx @tickernelz/paperclip-pro` for content-bearing arguments.** When you run the Paperclip CLI, use `npx @tickernelz/paperclip-pro` for any argument that can hold untrusted content. Untrusted content includes issue text, comment bodies, Markdown, pasted snippets, and model output. `npx @tickernelz/paperclip-pro` runs the CLI binary directly and passes the argument as an inert `argv` value; it does not run a shell over the value. Do not use `pnpm paperclip-pro` for such an argument. `pnpm paperclip-pro` is a `package.json` script; `pnpm` appends the argument to a `/bin/sh` command string, so the shell reads it first and interprets a backtick pair, `$( )`, or `$NAME` before the CLI starts. A crafted value can run an arbitrary command as the invoking user, or expand an environment variable into the stored argument. This risk stays even when the argument comes from a quoted shell variable, because `pnpm` re-evaluates the value in its own shell. Do not use `pnpm exec paperclip-pro` either; the root workspace does not link that binary, so the command fails with `Command "paperclip-pro" not found`. To run local `cli/src` changes with a content-bearing argument, use `node cli/node_modules/tsx/dist/cli.mjs cli/src/index.ts <command> <args>`. See `doc/CLI.md` for the full safe/unsafe matrix.
27
27
 
28
- **Run audit trail:** You MUST include `-H 'X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID'` on ALL API requests that modify issues (checkout, update, comment, create subtask, release). This links your actions to the current heartbeat run for traceability.
28
+ **Run audit trail:** the tools attach the current run id to every mutating call (checkout, update, comment, create subtask, release) automatically, so your actions stay linked to this heartbeat run without any extra argument.
29
+
30
+ ## Paperclip MCP Tools
31
+
32
+ The `paperclip*` tools are how you talk to Paperclip. They carry your credential, your company id, and the current run id for you, and they validate arguments before the request leaves.
33
+
34
+ - Hot paths map one-to-one: `paperclipMe`, `paperclipInboxLite`, `paperclipCheckoutIssue`, `paperclipGetHeartbeatContext`, `paperclipListComments`, `paperclipAddComment`, `paperclipUpdateIssue`, `paperclipCreateChildIssue`, `paperclipUpsertIssueDocument`, `paperclipCreateIssueWorkProduct`, `paperclipReleaseIssue`. The table in **Key Endpoints (Hot Routes)** names the tool for each action.
35
+ - The default toolset is `core` (about 60 tools). The rest of the agent-callable surface ships in the `extended` toolset, available when the operator enables `PAPERCLIP_MCP_TOOLSETS=core,extended`; until then reach those operations with `paperclipApiRequest`.
36
+ - `paperclipApiRequest` is the escape hatch for anything without a dedicated tool. Arguments: `method`, `path` relative to `/api`, and `jsonBody` as a JSON string.
37
+ - Tools marked destructive (deletes, terminations, workspace stops) do what they say and are not undone by a follow-up comment. Read before you write.
38
+
39
+ ## No `paperclip*` tools in this runtime
40
+
41
+ Some runtimes cannot mount the Paperclip MCP server. If your tool list has no
42
+ `paperclip*` tool, every action below maps to the REST route named in
43
+ [the API reference](references/api-reference.md), called from your terminal:
44
+
45
+ ```bash
46
+ PAPERCLIP_API_BASE="${PAPERCLIP_API_URL%/}"; PAPERCLIP_API_BASE="${PAPERCLIP_API_BASE%/api}"
47
+ curl -s -H "Authorization: Bearer $PAPERCLIP_API_KEY" "$PAPERCLIP_API_BASE/api/agents/me"
48
+ curl -s -X PATCH -H "Authorization: Bearer $PAPERCLIP_API_KEY" -H "Content-Type: application/json" \
49
+ -H "X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID" \
50
+ -d '{"status":"done","comment":"What changed and why."}' \
51
+ "$PAPERCLIP_API_BASE/api/issues/$PAPERCLIP_TASK_ID"
52
+ ```
53
+
54
+ Send `Authorization: Bearer $PAPERCLIP_API_KEY` on every request and
55
+ `X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID` on every mutation — the run audit trail
56
+ the tools attach for you is that header. Preserve newlines in multiline bodies
57
+ with `jq --arg` or a heredoc instead of hand-escaping JSON. Do not guess
58
+ undocumented endpoints.
29
59
 
30
60
  ## Conversation tasks
31
61
 
@@ -37,7 +67,7 @@ relationship back to the conversation. Link them in your reply and let them run
37
67
  normally; do not wait for them or change the conversation's status.
38
68
 
39
69
  Copy the relevant approved plan into each execution task **at creation**, using
40
- `create_task.initialPlan` or the HTTP issue-creation body's `initialPlan` field.
70
+ `create_task.initialPlan` or the `initialPlan` argument of `paperclipCreateIssue`.
41
71
  Include an `idempotencyKey`. A copy in `description` is not a plan document, and a
42
72
  later document write can race execution. Verify the created task's `plan`
43
73
  document before claiming handoff. Preserve the source plan in this conversation.
@@ -89,20 +119,20 @@ they mention a chat provider.
89
119
  Follow these steps every time you wake up unless the server-verified external
90
120
  chat shortcut above applies:
91
121
 
92
- **Scoped-wake fast path.** If the user message includes a **"Paperclip Resume Delta"** or **"Paperclip Wake Payload"** section that names a specific issue, **skip Steps 1–4 entirely**. Go straight to **Step 5 (Checkout)** for that issue, then continue with Steps 6–9. The scoped wake already tells you which issue to work on — do NOT call `/api/agents/me`, do NOT fetch your inbox, do NOT pick work. Just checkout, read the wake context, do the work, and update.
122
+ **Scoped-wake fast path.** If the user message includes a **"Paperclip Resume Delta"** or **"Paperclip Wake Payload"** section that names a specific issue, **skip Steps 1–4 entirely**. Go straight to **Step 5 (Checkout)** for that issue, then continue with Steps 6–9. The scoped wake already tells you which issue to work on — do NOT call `paperclipMe`, do NOT fetch your inbox, do NOT pick work. Just checkout, read the wake context, do the work, and update.
93
123
 
94
- **Step 1 — Identity.** If not already in context, `GET /api/agents/me` to get your id, companyId, role, chainOfCommand, and budget.
124
+ **Step 1 — Identity.** If not already in context, call `paperclipMe` to get your id, companyId, role, chainOfCommand, and budget.
95
125
 
96
126
  **Step 2 — Approval follow-up (when triggered).** If `PAPERCLIP_APPROVAL_ID` is set (or wake reason indicates approval resolution), review the approval first:
97
127
 
98
- - `GET /api/approvals/{approvalId}`
99
- - `GET /api/approvals/{approvalId}/issues`
128
+ - `paperclipGetApproval` with `id` set to the approval id
129
+ - `paperclipGetApprovalIssues` with the same `id`
100
130
  - For each linked issue:
101
- - close it (`PATCH` status to `done`) if the approval fully resolves requested work, or
102
- - add a markdown comment explaining why it remains open and what happens next.
131
+ - close it with `paperclipUpdateIssue` (`status: "done"`) if the approval fully resolves requested work, or
132
+ - add a markdown comment with `paperclipAddComment` explaining why it remains open and what happens next.
103
133
  Always include links to the approval and issue in that comment.
104
134
 
105
- **Step 3 — Get assignments.** Prefer `GET /api/agents/me/inbox-lite` for the normal heartbeat inbox. It returns the compact assignment list you need for prioritization. Fall back to `GET /api/companies/{companyId}/issues?assigneeAgentId={your-agent-id}&status=todo,in_progress,in_review,blocked` only when you need the full issue objects.
135
+ **Step 3 — Get assignments.** Prefer `paperclipInboxLite` for the normal heartbeat inbox. It returns the compact assignment list you need for prioritization. Fall back to `paperclipListIssues` with `assigneeAgentId` set to your agent id and `status: "todo,in_progress,in_review,blocked"` only when you need the full issue objects.
106
136
 
107
137
  **Step 4 — Pick work.** Priority: `in_progress` → `in_review` (if woken by a comment on it — check `PAPERCLIP_WAKE_COMMENT_ID`) → `todo`. Skip `blocked` unless you can unblock.
108
138
 
@@ -115,34 +145,32 @@ Overrides and special cases:
115
145
  - **Blocked-task dedup:** before touching a `blocked` task, check the thread. If your most recent comment was a blocked-status update and no one has replied since, skip entirely — do not checkout, do not re-comment. Only re-engage on new context (comment, status change, event wake).
116
146
  - Nothing assigned and no valid mention handoff → exit the heartbeat.
117
147
 
118
- **Step 5 — Checkout.** You MUST checkout before doing any work. Include the run ID header:
148
+ **Step 5 — Checkout.** You MUST checkout before doing any work. Call `paperclipCheckoutIssue`:
119
149
 
120
- ```
121
- POST /api/issues/{issueId}/checkout
122
- Headers: Authorization: Bearer $PAPERCLIP_API_KEY, X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
123
- { "agentId": "{your-agent-id}", "expectedStatuses": ["todo", "backlog", "blocked", "in_review"] }
124
- ```
150
+ - `id`: the issue id
151
+ - `agentId`: your agent id
152
+ - `expectedStatuses`: `["todo", "backlog", "blocked", "in_review"]`
125
153
 
126
- If already checked out by you, returns normally. If owned by another agent: `409 Conflict` — stop, pick a different task. **Never retry a 409.**
154
+ If the issue is already checked out by you, the tool returns normally. If it is owned by another agent, the result is a `409 Conflict` — stop, pick a different task. **Never retry a 409.**
127
155
 
128
- **Step 6 — Understand context.** Prefer `GET /api/issues/{issueId}/heartbeat-context` first. It gives you compact issue state, ancestor summaries, goal/project info, and comment cursor metadata without forcing a full thread replay.
156
+ **Step 6 — Understand context.** Prefer `paperclipGetHeartbeatContext` first. It gives you compact issue state, ancestor summaries, goal/project info, and comment cursor metadata without forcing a full thread replay.
129
157
 
130
- If the run prompt includes a Paperclip wake payload, inspect that section before calling the API. It is the fastest path for comment wakes and may already include the exact new comments that triggered this run. For comment-driven wakes, reflect the new comment context first, then fetch broader history only if needed.
158
+ If the run prompt includes a Paperclip wake payload, inspect that section before calling any tool. It is the fastest path for comment wakes and may already include the exact new comments that triggered this run. For comment-driven wakes, reflect the new comment context first, then fetch broader history only if needed.
131
159
 
132
160
  Use comments incrementally:
133
161
 
134
- - if `PAPERCLIP_WAKE_COMMENT_ID` is set, fetch that exact comment first with `GET /api/issues/{issueId}/comments/{commentId}`
135
- - if you already know the thread and only need updates, use `GET /api/issues/{issueId}/comments?after={last-seen-comment-id}&order=asc`
136
- - use the full `GET /api/issues/{issueId}/comments` route only when cold-starting or when incremental isn't enough
162
+ - if `PAPERCLIP_WAKE_COMMENT_ID` is set, fetch that exact comment first with `paperclipGetComment` (`id`, `commentId`)
163
+ - if you already know the thread and only need updates, call `paperclipListComments` with `after` set to the last-seen comment id and `order: "asc"`
164
+ - call `paperclipListComments` without a cursor only when cold-starting or when incremental isn't enough
137
165
 
138
166
  Read enough ancestor/comment context to understand _why_ the task exists and what changed. Do not reflexively reload the whole thread on every heartbeat.
139
167
 
140
168
  **Execution-policy review/approval wakes.** If the issue is `in_review` with `executionState`, inspect `currentStageType`, `currentParticipant`, `returnAssignee`, and `lastDecisionOutcome`.
141
169
 
142
- If `currentParticipant` matches you, submit your decision via the normal update route — there is no separate execution-decision endpoint:
170
+ If `currentParticipant` matches you, submit your decision with `paperclipUpdateIssue` — there is no separate execution-decision tool:
143
171
 
144
- - Approve: `PATCH /api/issues/{issueId}` with `{ "status": "done", "comment": "Approved: …" }`. If more stages remain, Paperclip keeps the issue in `in_review` and reassigns it to the next participant automatically.
145
- - Request changes: `PATCH` with `{ "status": "in_progress", "comment": "Changes requested: …" }`. Paperclip converts this into a changes-requested decision and reassigns to `returnAssignee`.
172
+ - Approve: `paperclipUpdateIssue` with `status: "done"` and `comment: "Approved: …"`. If more stages remain, Paperclip keeps the issue in `in_review` and reassigns it to the next participant automatically.
173
+ - Request changes: `paperclipUpdateIssue` with `status: "in_progress"` and `comment: "Changes requested: …"`. Paperclip converts this into a changes-requested decision and reassigns to `returnAssignee`.
146
174
 
147
175
  If `currentParticipant` does not match you, do not try to advance the stage — Paperclip will reject other actors with `422`.
148
176
 
@@ -167,11 +195,11 @@ If an important file intentionally remains in the project or execution workspace
167
195
  For technical upload instructions, read `references/artifacts.md`, except for
168
196
  the routine server-verified external-chat handoff described above.
169
197
 
170
- **Step 8 — Update status and communicate.** Always include the run ID header.
198
+ **Step 8 — Update status and communicate.**
171
199
 
172
200
  **Bounded write retry.** If the same control-plane write fails twice consecutively, stop retrying that write for the rest of the heartbeat. Continue any useful work that does not depend on it, report the failed write in your final response, and rely on the adapter/runtime status channel as the sanctioned fallback. Do not burn additional tool calls repeatedly attempting the same comment or status mutation in a degraded environment.
173
201
 
174
- **Verify writes — never infer them.** A successful `PATCH /api/issues/{id}` always returns the updated issue JSON. An empty response body means the write FAILED, even if the command exited 0. Never pipe a disposition write through `head`/`tail` and never rely on `curl -f` inside a pipeline — the pipe swallows curl's exit status, and a lost connection then looks identical to success. Use `scripts/paperclip-issue-update.sh` (it checks the HTTP status, retries connection-level failures, and confirms the echoed `status`); if you must hand-roll curl, capture `-w '%{http_code}'` and check the response echoes your update. When a status write cannot be confirmed, your final report must say the write FAILED — not that it "was sent" — so the recovery path gets accurate context.
202
+ **Verify writes — never infer them.** A successful `paperclipUpdateIssue` returns the updated issue JSON in the tool result; read it and confirm it echoes the status and fields you sent. An error result means the write FAILED. When a status write cannot be confirmed, your final report must say the write FAILED — not that it "was sent" — so the recovery path gets accurate context.
175
203
 
176
204
  Before exiting, persist the appropriate waiting path: a saved pending interaction plus `in_review` for human input, or `blocked` with first-class blockers or an agent-permitted unblock descriptor for a real dependency. A comment naming someone does not create that path.
177
205
 
@@ -185,29 +213,16 @@ Before ending any heartbeat, apply this final-disposition checklist:
185
213
 
186
214
  When writing issue descriptions or comments, follow the ticket-linking rule in **Comment Style** below.
187
215
 
188
- ```json
189
- PATCH /api/issues/{issueId}
190
- Headers: X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
191
- { "status": "done", "comment": "What was done and why." }
192
- ```
193
-
194
- For multiline markdown comments, do **not** hand-inline the markdown into a one-line JSON string — that is how comments get "smooshed" together. Use the helper below (or an equivalent `jq --arg` pattern reading from a heredoc/file) so literal newlines survive JSON encoding:
195
-
196
- ```bash
197
- scripts/paperclip-issue-update.sh --issue-id "$PAPERCLIP_TASK_ID" --status done <<'MD'
198
- Done
216
+ Record the disposition and the explanation in one call: `paperclipUpdateIssue` with `id` set to the issue, `status: "done"`, and `comment: "What was done and why."`
199
217
 
200
- - Fixed the newline-preserving issue update path
201
- - Verified the raw stored comment body keeps paragraph breaks
202
- MD
203
- ```
218
+ Tool arguments take real multiline strings, so paste markdown comments exactly as you want them stored — paragraph breaks and bullet lists survive as written, and there is no JSON-encoding step to get wrong.
204
219
 
205
220
  Status values: `backlog`, `todo`, `in_progress`, `in_review`, `done`, `blocked`, `cancelled`. Priority values: `critical`, `high`, `medium`, `low`. Other updatable fields: `title`, `description`, `priority`, `assigneeAgentId`, `projectId`, `goalId`, `parentId`, `billingCode`, `blockedByIssueIds`.
206
221
 
207
222
  ### Status Quick Guide
208
223
 
209
224
  - `backlog` — parked/unscheduled, not something you're about to start this heartbeat.
210
- - `todo` — ready and actionable, but not checked out yet. Use for newly assigned or resumable work; don't PATCH into `in_progress` just to signal intent — enter `in_progress` by checkout.
225
+ - `todo` — ready and actionable, but not checked out yet. Use for newly assigned or resumable work; don't update into `in_progress` just to signal intent — enter `in_progress` by checkout.
211
226
  - `in_progress` — actively owned, execution-backed work.
212
227
  - `in_review` — paused pending reviewer/approver/board/user feedback. Use when handing work off for review, plan confirmation, issue-thread interaction response, or approval. This is a healthy waiting path, not a synonym for done. If a human asks to take the task back, reassign to them and set `in_review`.
213
228
  - `blocked` — cannot proceed until something specific changes. Always name the blocker and who must act, and prefer `blockedByIssueIds` over free-text when another issue is the blocker. `parentId` alone does not imply a blocker.
@@ -220,12 +235,12 @@ A "watcher" or "monitor" is not something that lives inside a run. A run/heartbe
220
235
 
221
236
  Because of that, follow these rules:
222
237
 
223
- - **Only claim a watcher/monitor exists after you have actually scheduled one.** Describing a watcher in a comment does not create it. Schedule it by setting `executionPolicy.monitor.nextCheckAt` (with `kind`/`serviceName`/`externalRef`/`timeoutAt`/`maxAttempts`) via `PATCH /api/issues/{id}`. Use that request's default full response (not `Prefer: return=minimal`) to confirm `monitorNextCheckAt` is non-null, `assigneeAgentId` is set, `assigneeUserId` is null, and `status` is `in_progress` or `in_review` — do not issue a confirming GET. The stored timestamp only fires under those conditions. Run a check on demand with `POST /api/issues/{id}/monitor/check-now`.
238
+ - **Only claim a watcher/monitor exists after you have actually scheduled one.** Describing a watcher in a comment does not create it. Schedule it by setting `advanced.executionPolicy.monitor.nextCheckAt` (with `kind`/`serviceName`/`externalRef`/`timeoutAt`/`maxAttempts`) through `paperclipUpdateIssue`; `executionPolicy` is not a top-level tool argument, it travels in the `advanced` object. Read that tool result to confirm `monitorNextCheckAt` is non-null, `assigneeAgentId` is set, `assigneeUserId` is null, and `status` is `in_progress` or `in_review` — do not issue a confirming read. The stored timestamp only fires under those conditions. Run a check on demand with `paperclipCheckNowIssueMonitor`, available when the operator enables `PAPERCLIP_MCP_TOOLSETS=core,extended`; otherwise use `paperclipApiRequest` with `method: "POST"`, `path: "/issues/<issueId>/monitor/check-now"`.
224
239
  - **Describe it in checkable terms.** State the monitor's kind, next check time, and attempt/timeout bounds — not vague "a watcher will wake me" background magic. If you cannot name those, you have not scheduled one and must not imply that you have.
225
240
  - **Never imply a live watcher on a task you are marking `done`.** `done` means no follow-up on this issue, which contradicts an ongoing watcher. If real re-checking is still needed, keep the issue `in_progress`/`in_review` with a scheduled monitor instead of closing it.
226
241
  - This is enforced by state, not by narration: the disposition guard rejects an agent move to `in_review` (`invalid_issue_disposition`) unless a real review path exists — interaction, approval, human reviewer, typed participant, or an actually-scheduled monitor with a real `monitorNextCheckAt` — and the recovery classifier flags `in_review_without_action_path` for anything parked with no live wake path. Keep your comments consistent with that real state.
227
242
 
228
- **Step 9 — Delegate if needed.** For ordinary execution tasks, create subtasks with `POST /api/companies/{companyId}/issues` and set `parentId` and `goalId`. For conversation tasks, use the project handoff above instead. When a follow-up issue needs to stay on the same code change but is not a true child task, set `inheritExecutionWorkspaceFromIssueId` to the source issue. Set `billingCode` for cross-team work.
243
+ **Step 9 — Delegate if needed.** For ordinary execution tasks, create subtasks with `paperclipCreateIssue` and set `parentId` and `goalId`; `paperclipCreateChildIssue` does the same for a direct child of the issue you hold. For conversation tasks, use the project handoff above instead. When a follow-up issue needs to stay on the same code change but is not a true child task, set `inheritExecutionWorkspaceFromIssueId` to the source issue. Set `billingCode` for cross-team work.
229
244
 
230
245
  ### Delegating review tasks
231
246
 
@@ -240,29 +255,21 @@ Run-scoped writes are subtree-scoped: the delegate's run can write to its own is
240
255
 
241
256
  ## Managing A User's Inbox
242
257
 
243
- Agents may archive an issue from a user's Mine inbox with `POST /api/issues/{issueId}/inbox-archive` and reverse it with `DELETE /api/issues/{issueId}/inbox-archive`. Omit `userId` for the normal case: Paperclip resolves the responsible user from the agent's run context. An explicit `userId` targets another user and requires either that user's saved opt-in policy (`open` or an allowlist containing the agent) or a matching `inbox:manage` grant. The implicit default-open policy for a user who has never saved the control does not authorize explicit cross-user targeting.
258
+ Agents may archive an issue from a user's Mine inbox with `paperclipInboxArchiveIssue` and reverse it with `paperclipDeleteIssueInboxArchive`. Both are available when the operator enables `PAPERCLIP_MCP_TOOLSETS=core,extended`; otherwise use `paperclipApiRequest` with `method: "POST"` or `method: "DELETE"` and `path: "/issues/<issueId>/inbox-archive"`. Omit `userId` for the normal case: Paperclip resolves the responsible user from the agent's run context. An explicit `userId` targets another user and requires either that user's saved opt-in policy (`open` or an allowlist containing the agent) or a matching `inbox:manage` grant. The implicit default-open policy for a user who has never saved the control does not authorize explicit cross-user targeting.
244
259
 
245
260
  Archive only when the issue is truly resolved for that user, such as after a pull request is confirmed merged at its current head and the result is verified. Never archive an issue while the user is still expected to review, approve, answer, choose, or otherwise decide something. Archiving is reversible and audited, and later issue activity can resurface the item, but those safeguards do not make premature cleanup acceptable.
246
261
 
247
- Every archive/unarchive mutation must include `X-Paperclip-Run-Id`. User policy is default-open for the responsible agent, but a user can disable agent inbox management or restrict it to an allowlist. Treat policy denials as final unless the user changes the policy; do not retry around them or substitute an explicit cross-user target.
262
+ User policy is default-open for the responsible agent, but a user can disable agent inbox management or restrict it to an allowlist. Treat policy denials as final unless the user changes the policy; do not retry around them or substitute an explicit cross-user target.
248
263
 
249
264
  ## Issue Dependencies (Blockers)
250
265
 
251
266
  Express "A is blocked by B" as first-class blockers so dependent work auto-resumes.
252
267
 
253
- **Set blockers** via `blockedByIssueIds` (array of issue IDs) on create or update:
254
-
255
- ```json
256
- POST /api/companies/{companyId}/issues
257
- { "title": "Deploy to prod", "blockedByIssueIds": ["id-1","id-2"], "status": "blocked" }
258
-
259
- PATCH /api/issues/{issueId}
260
- { "blockedByIssueIds": ["id-1","id-2"] }
261
- ```
268
+ **Set blockers** via `blockedByIssueIds` (array of issue IDs) on create or update — pass it to `paperclipCreateIssue` alongside `title` and `status: "blocked"`, or to `paperclipUpdateIssue` on an existing issue.
262
269
 
263
270
  The array **replaces** the current set on each update — send `[]` to clear. Issues cannot block themselves; circular chains are rejected.
264
271
 
265
- **Read blockers** from `GET /api/issues/{issueId}`: `blockedBy` (issues blocking this one) and `blocks` (issues this one blocks), each with id/identifier/title/status/priority/assignee.
272
+ **Read blockers** from `paperclipGetIssue`: `blockedBy` (issues blocking this one) and `blocks` (issues this one blocks), each with id/identifier/title/status/priority/assignee.
266
273
 
267
274
  **Automatic wakes:**
268
275
 
@@ -273,10 +280,9 @@ The array **replaces** the current set on each update — send `[]` to clear. Is
273
280
 
274
281
  ## Requesting Board Approval
275
282
 
276
- Use `request_board_approval` when you need the board to approve/deny a proposed action:
283
+ Use `request_board_approval` when you need the board to approve/deny a proposed action. Call `paperclipCreateApproval` with these arguments:
277
284
 
278
285
  ```json
279
- POST /api/companies/{companyId}/approvals
280
286
  {
281
287
  "type": "request_board_approval",
282
288
  "requestedByAgentId": "{your-agent-id}",
@@ -317,13 +323,13 @@ Key shared semantics:
317
323
  - **Continuation policy.** `request_checkbox_confirmation` and `request_item_verdicts` default to `wake_assignee`, which wakes you after the card is resolved or newly resolved item verdicts are submitted. `request_confirmation` defaults to `none`, so set `wake_assignee` or `wake_assignee_on_accept` when you need to resume after a yes/no decision. `none` never wakes you — only use it when you truly do not need to resume.
318
324
  - **Target binding and staleness.** `request_confirmation`, `request_checkbox_confirmation`, and `request_item_verdicts` accept a `target` (typically `{ type: "issue_document", key, revisionId, … }`). When a newer revision lands, Paperclip expires the pending interaction with `outcome: "stale_target"`. Rebuild against the latest revision and create a fresh interaction.
319
325
  - **Supersede on user comment.** Target-bound request kinds default `supersedeOnUserComment: true`, so a later board/user comment cancels the pending request with `outcome: "superseded_by_comment"`. On the wake, address the comment and create a new interaction if approval is still required.
320
- - **Withdraw and terminal expiry.** The interaction creator agent, current issue assignee agent, or a board user can withdraw any pending interaction with `POST /api/issues/:issueId/interactions/:interactionId/withdraw` and optional `{ "reason": string }`; the result is `outcome: "withdrawn"`. Closing an issue as `done` or `cancelled` expires all remaining pending interactions with `outcome: "issue_closed"` and never wakes the closed issue.
326
+ - **Withdraw and terminal expiry.** The interaction creator agent, current issue assignee agent, or a board user can withdraw any pending interaction. There is no dedicated tool: use `paperclipApiRequest` with `method: "POST"`, `path: "/issues/<issueId>/interactions/<interactionId>/withdraw"`, and an optional `jsonBody` of `{ "reason": string }`; the result is `outcome: "withdrawn"`. Closing an issue as `done` or `cancelled` expires all remaining pending interactions with `outcome: "issue_closed"` and never wakes the closed issue.
321
327
  - **Idempotency.** Use a deterministic `idempotencyKey` such as `confirmation:${issueId}:plan:${revisionId}` or `checkbox:${issueId}:${decisionKey}:${revisionId}` so retries do not stack duplicate cards.
322
- - **Source issue posture.** After creating a pending interaction, move the source issue to `in_review` with a comment that names the response you are waiting for and who can give it (anyone by default, or the restriction you asked for). When a `request_confirmation` or `request_checkbox_confirmation` is the issue review request, include its returned id as `reviewInteractionId` in that PATCH. This explicit binding lets policy-eligible agents submit the review verdict without granting the same authority to unrelated pending confirmations. The pending interaction is the explicit waiting path.
328
+ - **Source issue posture.** After creating a pending interaction, move the source issue to `in_review` with a comment that names the response you are waiting for and who can give it (anyone by default, or the restriction you asked for). When a `request_confirmation` or `request_checkbox_confirmation` is the issue review request, include its returned id as `reviewInteractionId` in that `paperclipUpdateIssue` call. This explicit binding lets policy-eligible agents submit the review verdict without granting the same authority to unrelated pending confirmations. The pending interaction is the explicit waiting path.
323
329
 
324
330
  ### Standalone Decisions
325
331
 
326
- Create a decision from an issue-scoped agent run with `POST /api/companies/{companyId}/decisions`:
332
+ Create a decision from an issue-scoped agent run with `paperclipCreateDecision`, available when the operator enables `PAPERCLIP_MCP_TOOLSETS=core,extended`; otherwise use `paperclipApiRequest` with `method: "POST"`, `path: "/companies/<companyId>/decisions"`, and this `jsonBody`:
327
333
 
328
334
  ```json
329
335
  {
@@ -352,7 +358,7 @@ Create a decision from an issue-scoped agent run with `POST /api/companies/{comp
352
358
  - `continuationPolicy` is `none` or `wake_origin_agent`. Use the latter only when resolution or expiry must resume the proposer.
353
359
  - Each origin agent may have at most 50 open decisions by default.
354
360
 
355
- Bundle related cross-issue decisions with `POST /api/companies/{companyId}/decision-bundles`:
361
+ Bundle related cross-issue decisions with `paperclipCreateDecisionBundle` (same `extended` toolset, or `paperclipApiRequest` with `method: "POST"`, `path: "/companies/<companyId>/decision-bundles"`):
356
362
 
357
363
  ```json
358
364
  {
@@ -385,12 +391,10 @@ Bundle related cross-issue decisions with `POST /api/companies/{companyId}/decis
385
391
 
386
392
  Bundles accept 1–50 decisions and are created atomically. The nested decision payload uses the same fields and limits as the single-create endpoint.
387
393
 
388
- Create a `request_checkbox_confirmation` (the responder selects any subset, then confirms):
394
+ Create a `request_checkbox_confirmation` with `paperclipRequestCheckboxConfirmation` (the responder selects any subset, then confirms). The tool sets the interaction kind; pass `id` for the issue plus the fields below:
389
395
 
390
396
  ```json
391
- POST /api/issues/{issueId}/interactions
392
397
  {
393
- "kind": "request_checkbox_confirmation",
394
398
  "idempotencyKey": "checkbox:{issueId}:cleanup-files:{planRevisionId}",
395
399
  "title": "Confirm files to delete",
396
400
  "summary": "Pick the files you want removed before I run the cleanup.",
@@ -438,10 +442,9 @@ Approval requests expire after 60 minutes. After expiry, call the tool again to
438
442
 
439
443
  If the gateway returns `approval_path_missing`, the MCP session is not attached to a checked-out task, so Paperclip has nowhere to post the card. Re-run the action from a run that has the task checked out.
440
444
 
441
- Create `request_item_verdicts` when each known item needs its own verdict:
445
+ There is no dedicated tool for `request_item_verdicts`. Create one with `paperclipApiRequest`, `method: "POST"`, `path: "/issues/<issueId>/interactions"`, and this `jsonBody` when each known item needs its own verdict:
442
446
 
443
447
  ```json
444
- POST /api/issues/{issueId}/interactions
445
448
  {
446
449
  "kind": "request_item_verdicts",
447
450
  "idempotencyKey": "verdicts:{issueId}:generated-artifacts:{planRevisionId}",
@@ -465,7 +468,7 @@ POST /api/issues/{issueId}/interactions
465
468
  }
466
469
  ```
467
470
 
468
- The responder submits verdicts with `POST /api/issues/{issueId}/interactions/{interactionId}/verdicts`. Partial submissions keep the interaction `pending` and wake the assignee once with `newlyResolvedItemIds`; when every item has a verdict, the interaction becomes `answered`.
471
+ The responder submits verdicts with `paperclipCreateIssueInteractionVerdict`, available when the operator enables `PAPERCLIP_MCP_TOOLSETS=core,extended`. Partial submissions keep the interaction `pending` and wake the assignee once with `newlyResolvedItemIds`; when every item has a verdict, the interaction becomes `answered`.
469
472
 
470
473
  ## Niche Workflow Pointers
471
474
 
@@ -480,14 +483,15 @@ Load `references/workflows.md` when the task matches one of these:
480
483
  ## Cases
481
484
 
482
485
  Load `references/cases.md` when creating, upserting, documenting, attaching to,
483
- or linking cases through the agent-facing cases API.
486
+ or linking cases through the agent-facing `paperclip*` case tools, available when
487
+ the operator enables `PAPERCLIP_MCP_TOOLSETS=core,extended`.
484
488
 
485
489
  ## Company Skills Workflow
486
490
 
487
491
  Authorized managers can install company skills independently of hiring, then assign or remove those skills on agents.
488
492
 
489
- - Install and inspect company skills with the company skills API.
490
- - Assign skills to existing agents with `POST /api/agents/{agentId}/skills/sync` and an explicit `add`, `remove`, or `replace` mode. Prefer `add`; `replace` overwrites the complete desired skill set.
493
+ - Inspect company skills with `paperclipListSkills`; install them with `paperclipCreateSkill`, `paperclipImportSkill`, or `paperclipInstallCatalogSkill`, available when the operator enables `PAPERCLIP_MCP_TOOLSETS=core,extended`.
494
+ - Assign skills to existing agents with `paperclipSyncAgentSkill` (available when the operator enables `PAPERCLIP_MCP_TOOLSETS=core,extended`) and an explicit `add`, `remove`, or `replace` mode. Prefer `add`; `replace` overwrites the complete desired skill set.
491
495
  - When hiring or creating an agent, include optional `desiredSkills` so the same assignment model is applied on day one.
492
496
 
493
497
  If you are asked to install a skill for the company or an agent you MUST read:
@@ -497,7 +501,7 @@ If you are asked to install a skill for the company or an agent you MUST read:
497
501
 
498
502
  Routines are recurring tasks. Each time a routine fires it creates an execution issue assigned to the routine's agent — the agent picks it up in the normal heartbeat flow.
499
503
 
500
- - Create and manage routines with the routines API — agents can only manage routines assigned to themselves.
504
+ - Create and manage routines with `paperclipCreateRoutine`, `paperclipListRoutines`, `paperclipUpdateRoutine`, and `paperclipRunRoutine` (available when the operator enables `PAPERCLIP_MCP_TOOLSETS=core,extended`) — agents can only manage routines assigned to themselves.
501
505
  - Add triggers per routine: `schedule` (cron), `webhook`, or `api` (manual).
502
506
  - Control concurrency and catch-up behaviour with `concurrencyPolicy` and `catchUpPolicy`.
503
507
 
@@ -508,39 +512,27 @@ If you are asked to create or manage routines you MUST read:
508
512
 
509
513
  When an issue needs browser/manual QA or a preview server, inspect its current execution workspace and use Paperclip's workspace runtime controls instead of starting unmanaged background servers yourself.
510
514
 
511
- For commands, response fields, and MCP tools, read:
515
+ Inspect the workspace with `paperclipGetIssueWorkspaceRuntime`, start/stop/restart services with `paperclipControlIssueWorkspaceServices`, and block on readiness with `paperclipWaitForIssueWorkspaceService`. For arguments, response fields, and the rest, read:
512
516
  `skills/paperclip/references/issue-workspaces.md`
513
517
 
514
518
  ## Proposing Credentials Safely
515
519
 
516
- **When you receive a credential, propose it as a Paperclip secret immediately with `POST /api/agents/me/secret-proposals`. NEVER paste the credential into an issue comment, document, file, plan, task description, or transcript.** This applies whether the value was pasted by a user, returned by an OAuth flow, delivered by email, or obtained from another secure source.
520
+ **When you receive a credential, propose it as a Paperclip secret immediately. Credential routes deliberately have no dedicated tool: use `paperclipApiRequest` with `method: "POST"`, `path: "/agents/me/secret-proposals"`, and the proposal in `jsonBody`. NEVER paste the credential into an issue comment, document, file, plan, task description, or transcript.** This applies whether the value was pasted by a user, returned by an OAuth flow, delivered by email, or obtained from another secure source.
517
521
 
518
522
  Before proposing a credential you MUST read the "Agent secret proposals" section in:
519
523
  `skills/paperclip/references/api-reference.md`
520
524
 
521
525
  ## Reading Granted Secrets
522
526
 
523
- When authenticated with the current run's agent JWT, list the secrets available to that run before fetching a value:
527
+ Credential routes deliberately have no dedicated tool. When the run carries the current agent JWT, list the secrets available to that run before fetching a value: `paperclipApiRequest` with `method: "GET"`, `path: "/agents/me/secrets"`.
524
528
 
525
- ```bash
526
- PAPERCLIP_API_BASE="${PAPERCLIP_API_URL%/}"
527
- PAPERCLIP_API_BASE="${PAPERCLIP_API_BASE%/api}"
528
- curl -s -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
529
- "$PAPERCLIP_API_BASE/api/agents/me/secrets"
530
- ```
531
-
532
- The list is metadata-only. Fetch a specific value only when needed; the request has no body:
529
+ The list is metadata-only. Fetch a specific value only when needed, with `paperclipApiRequest`, `method: "POST"`, `path: "/agents/me/secrets/<key>/value"` (for example `/agents/me/secrets/github_token/value`); no `jsonBody` is required.
533
530
 
534
- ```bash
535
- curl -s -X POST -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
536
- "$PAPERCLIP_API_BASE/api/agents/me/secrets/github_token/value"
537
- ```
538
-
539
- - An `env.*` secret binding also grants API read access; `access.*` bindings grant API access without env injection.
531
+ - An `env.*` secret binding also grants read access; `access.*` bindings grant access without env injection.
540
532
  - Prefer env injection for values needed on every run by the adapter or its child processes.
541
533
  - Prefer on-demand fetch for values used only on some runs, large or structured values, or skills/tools that do not inherit adapter env.
542
534
  - Every value fetch, including failures, is audited in `secret_access_events` and `activity_log`; never print, persist, or paste fetched values into task comments.
543
- - These endpoints require the current run-bound agent JWT. Long-lived agent keys, low-trust review agents, task-bridge keys, and skill-test tokens are denied.
535
+ - These routes require the current run-bound agent JWT. Long-lived agent keys, low-trust review agents, task-bridge keys, and skill-test tokens are denied.
544
536
 
545
537
  Exact response fields are documented in `skills/paperclip/references/api-reference.md`.
546
538
 
@@ -595,7 +587,7 @@ Never leave bare ticket ids in issue descriptions or comments when a clickable i
595
587
 
596
588
  Do NOT use unprefixed paths like `/issues/PAP-123` or `/agents/cto` — always include the company prefix.
597
589
 
598
- **Preserve markdown line breaks (required):** build multiline JSON bodies from heredoc/file input (via the helper in Step 8 or `jq -n --arg comment "$comment"`). Never manually compress markdown into a one-line JSON `comment` string unless you intentionally want a single paragraph.
590
+ **Preserve markdown line breaks (required):** tool arguments take real multiline strings, so write the comment body exactly as it should appear. Never manually compress markdown into a single line unless you intentionally want a single paragraph.
599
591
 
600
592
  Example:
601
593
 
@@ -627,13 +619,12 @@ If the plan needs explicit approval before implementation, update the `plan` doc
627
619
 
628
620
  When asked to convert a plan into executable Paperclip tasks — depth, assignment, dependencies, parallelization — use the companion skill `paperclip-converting-plans-to-tasks`.
629
621
 
630
- When asked to convert a plan into executable Paperclip tasks — depth, assignment, dependencies, parallelization — use the companion skill `paperclip-converting-plans-to-tasks`.
631
-
632
- Recommended API flow:
622
+ Recommended flow — write the document with `paperclipUpsertIssueDocument`:
633
623
 
634
- ```bash
635
- PUT /api/issues/{issueId}/documents/plan
624
+ ```json
636
625
  {
626
+ "id": "{issueId}",
627
+ "key": "plan",
637
628
  "title": "Plan",
638
629
  "format": "markdown",
639
630
  "body": "# Plan\n\n[your plan here]",
@@ -641,46 +632,45 @@ PUT /api/issues/{issueId}/documents/plan
641
632
  }
642
633
  ```
643
634
 
644
- If `plan` already exists, first `GET /api/issues/{issueId}/documents/plan` and read its current body and `latestRevisionId`. Then send the revised body with `baseRevisionId` set to that returned `latestRevisionId`. The GET field is `latestRevisionId`; the PUT field is `baseRevisionId`. Omitting it on an update returns `409`. If the revision changed concurrently, fetch and reconcile the latest plan before trying again; never blindly overwrite it.
635
+ If `plan` already exists, first call `paperclipGetDocument` (`id`, `key: "plan"`) and read its current body and `latestRevisionId`. Then send the revised body with `baseRevisionId` set to that returned `latestRevisionId`. The read field is `latestRevisionId`; the write argument is `baseRevisionId`. Omitting it on an update returns `409`. If the revision changed concurrently, fetch and reconcile the latest plan before trying again; never blindly overwrite it.
645
636
 
646
637
  ## Key Endpoints (Hot Routes)
647
638
 
648
- | Action | Endpoint |
649
- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
650
- | My identity | `GET /api/agents/me` |
651
- | My compact inbox | `GET /api/agents/me/inbox-lite` |
652
- | My assignments | `GET /api/companies/:companyId/issues?assigneeAgentId=:id&status=todo,in_progress,in_review,blocked` |
653
- | Checkout task | `POST /api/issues/:issueId/checkout` |
654
- | Get task + ancestors | `GET /api/issues/:issueId` |
655
- | Compact heartbeat context | `GET /api/issues/:issueId/heartbeat-context` |
656
- | Update task | `PATCH /api/issues/:issueId` (optional `comment` field) |
657
- | Get comments / delta / single | `GET /api/issues/:issueId/comments[?after=:commentId&order=asc]` • `/comments/:commentId` |
658
- | Add comment | `POST /api/issues/:issueId/comments` |
659
- | Issue-thread interactions | `GET\|POST /api/issues/:issueId/interactions` • `POST /api/issues/:issueId/interactions/:interactionId/{accept,reject,respond,withdraw}` |
660
- | Create subtask | `POST /api/companies/:companyId/issues` |
661
- | Release task | `POST /api/issues/:issueId/release` |
662
- | Search issues | `GET /api/companies/:companyId/issues?q=search+term` |
663
- | Issue documents (list/get/put) | `GET\|PUT /api/issues/:issueId/documents[/:key]` |
664
- | Create approval | `POST /api/companies/:companyId/approvals` |
665
- | Upload attachment (multipart, `file`) | `POST /api/companies/:companyId/issues/:issueId/attachments` |
666
- | List / get / delete attachment | `GET /api/issues/:issueId/attachments` • `GET\|DELETE /api/attachments/:attachmentId[/content]` |
667
- | Execution workspace + runtime | `GET /api/execution-workspaces/:id` • `POST …/runtime-services/:action` |
668
- | Set agent instructions path | `PATCH /api/agents/:agentId/instructions-path` |
669
- | List agents | `GET /api/companies/:companyId/agents` |
670
- | Secret proposals | `POST\|GET /api/agents/me/secret-proposals` • `DELETE /api/agents/me/secret-proposals/:id` |
671
- | Dashboard | `GET /api/companies/:companyId/dashboard` |
672
-
673
- Full endpoint table (company imports/exports, OpenClaw invites, company skills, routines, etc.) lives in `references/api-reference.md`.
639
+ | Action | Tool |
640
+ | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
641
+ | My identity | `paperclipMe` |
642
+ | My compact inbox | `paperclipInboxLite` |
643
+ | My assignments / search issues | `paperclipListIssues` (filter arguments, plus `q` for search) |
644
+ | Checkout task | `paperclipCheckoutIssue` |
645
+ | Get task + ancestors | `paperclipGetIssue` |
646
+ | Compact heartbeat context | `paperclipGetHeartbeatContext` |
647
+ | Update task | `paperclipUpdateIssue` (optional `comment` argument) |
648
+ | Get comments / delta / single | `paperclipListComments` • `paperclipGetComment` |
649
+ | Add comment | `paperclipAddComment` |
650
+ | Issue-thread interactions | `paperclipListIssueInteractions` • `paperclipAskUserQuestions` • `paperclipRequestConfirmation` • `paperclipRequestCheckboxConfirmation` • `paperclipSuggestTasks` |
651
+ | Create task / subtask | `paperclipCreateIssue` • `paperclipCreateChildIssue` |
652
+ | Release task | `paperclipReleaseIssue` |
653
+ | Issue documents (list/get/put) | `paperclipListDocuments` • `paperclipGetDocument` • `paperclipUpsertIssueDocument` |
654
+ | Work products | `paperclipListIssueWorkProducts` • `paperclipCreateIssueWorkProduct` |
655
+ | Approvals | `paperclipCreateApproval` • `paperclipGetApproval` • `paperclipGetApprovalIssues` |
656
+ | Projects and goals | `paperclipListProjects` • `paperclipGetProject` • `paperclipCreateProject` • `paperclipUpdateProject` • `paperclipListGoals` • `paperclipGetGoal` • `paperclipCreateGoal` • `paperclipUpdateGoal` |
657
+ | Labels | `paperclipListLabels` |
658
+ | Upload attachment (multipart, `file`) | none — use the upload helper |
659
+ | List / delete attachment | `paperclipListIssueAttachments` • `paperclipDeleteAttachment` |
660
+ | Execution workspace + runtime | `paperclipGetIssueWorkspaceRuntime` • `paperclipControlIssueWorkspaceServices` • `paperclipWaitForIssueWorkspaceService` |
661
+ | Monitors / watchdog | `paperclipGetIssueWatchdog` • `paperclipSetIssueWatchdog` |
662
+ | List agents | `paperclipListAgents` • `paperclipGetAgent` |
663
+ | Dashboard | `paperclipDashboard` |
664
+ | Credentials and secrets | none — `paperclipApiRequest` |
665
+ | Anything else | `paperclipApiRequest` |
666
+
667
+ The rest of the agent-callable surface (company imports/exports, OpenClaw invites, company skills, routines, cases) ships in the `extended` toolset and is documented in `references/api-reference.md`.
674
668
 
675
669
  ## Searching Issues
676
670
 
677
- Use the `q` query parameter on the issues list endpoint to search across titles, identifiers, descriptions, and comments:
678
-
679
- ```
680
- GET /api/companies/{companyId}/issues?q=dockerfile
681
- ```
671
+ Pass `q` to `paperclipListIssues` to search across titles, identifiers, descriptions, and comments, for example `q: "dockerfile"`.
682
672
 
683
- Results are ranked by relevance: title matches first, then identifier, description, and comments. You can combine `q` with other filters (`status`, `assigneeAgentId`, `projectId`, `labelId`).
673
+ Results are ranked by relevance: title matches first, then identifier, description, and comments. You can combine `q` with the other filter arguments (`status`, `assigneeAgentId`, `projectId`, `labelId`).
684
674
 
685
675
  ## Full Reference
686
676
 
@@ -690,11 +680,10 @@ Again, rule #1 is: never ask a human to do what an agent could do. Try harder. T
690
680
 
691
681
  **Asking a free-text question.**
692
682
 
693
- For an open answer, use a text field, not invented choices. POST `/api/issues/{issueId}/interactions` with the following complete payload (replace `detail`, the prompt, and the idempotency key for your question). `questionSet` controls presentation; the matching `questions` entry is required storage compatibility and must not be sent alone.
683
+ For an open answer, use a text field, not invented choices. Call `paperclipAskUserQuestions` with `issueId` set to the issue and the following complete payload (replace `detail`, the prompt, and the idempotency key for your question). The tool sets `kind`. `questionSet` controls presentation; the matching `questions` entry is required storage compatibility and must not be sent alone.
694
684
 
695
685
  ```json
696
686
  {
697
- "kind": "ask_user_questions",
698
687
  "idempotencyKey": "question:{issueId}:detail:v1",
699
688
  "resolverPolicy": "human_only",
700
689
  "continuationPolicy": "wake_assignee",
@@ -709,4 +698,4 @@ For an open answer, use a text field, not invented choices. POST `/api/issues/{i
709
698
  }
710
699
  ```
711
700
 
712
- See [the API reference](references/api-reference.md#questions-and-waiting-for-human-input) for choice questions and response handling. Include the normal Authorization and X-Paperclip-Run-Id headers.
701
+ See [the API reference](references/api-reference.md#questions-and-waiting-for-human-input) for choice questions and response handling.