SuperAPI AI Directory

fast-ship

Office & productivity

View repository

Updated 11-08 16:16

About this skill

Fast Ship API
What you want to do Actual call
Leave a message / post a comment / write a completion summary on an issue PUT /api/issues/:iid/collab/summary(posting a comment with an API Key always returns 40301)
Mark as complete when wrapping up PUT /api/issues/:iid/internal-meta set workflow_status=done(not state)
Close the issue Not possible—JWT only; passing an API Key state always returns 40301
Started working on it PUT /api/issues/:iid/internal-meta set in_progress
Record consensus/decisions PUT /api/issues/:iid/collab/consensus
Find an issue by INT-xxx find the issue GET /api/projects/:pid/issues?q=INT-56 replace with UUID (path parameters only accept UUIDs)
Query Fast Ship's own logs GET /api/self-logs(list),/aggregate、/trace(request_id or run_id (choose one); unrelated to the project log /projects/:id/logs ; fsr_ tokens return 40301
Attach a PR to an issue POST /api/issues/:iid/pull-requests,body {"url":"<PR链接>"}
Refresh PR status POST /api/issues/:iid/pull-requests/sync(call after merge; for per-line failures see failures[])
Detach a PR DELETE /api/issues/:iid/pull-requests/:lid(:lid is the association row id, i.e. the {id})

Before calling any write endpoint, first read references/api.md the corresponding section; do not construct request bodies from memory.

Fast Ship appended block (the reference block at the end of the prompt)

The prompt generated by Fast Ship's "start thread" = the user template body + the trailing > reference block. If you see the reference block containing 项目ID / 问题ID, use the skill to query and handle that issue by these two IDs; there is no need to ask which issue it is:

> 以下信息由 Fast Ship 附加。请使用 fast-ship 技能查询并处理该问题。
> 若当前环境未安装 fast-ship 技能,先征得用户同意,再执行:
> `npx skills add https://github.com/gitbobobo/fast_ship --skill fast-ship`
> 项目ID:<project_id>
> 问题ID:<issue_id>
> 推荐理由:<reason>   ← 可能出现

If this skill is not installed in the current environment, first obtain the user's consent, then run npx skills add https://github.com/gitbobobo/fast_ship --skill fast-ship。

T3 binding (Agent-assisted configuration)

Fast Ship projects and T3 projects are explicitly bound; the Agent can assist with "discover → compare → bind":

  1. GET /api/environments/t3-projects: list each environment and its T3 projects (including workspace_root)。
  2. Compare each project's workspace_rootusing your own repository path to determine which T3 project you correspond to.
  3. PUT /api/projects/{id}/t3-bindings/{environmentId},body {"t3_project_id":"..."} to complete the binding; to unbind, use DELETE with the same path.

These four endpoints are the T3 read-only surface open to API Keys (no credentials, no thread content); thread-related endpoints remain JWT-only. For field details see references/api.md。

In the table above, :pid in api.md is {id},:iid is {iid};:lid is the PR association row id (in api.md, pull-requests under the path {id})。

Authentication configuration

Fast Ship uses API Key for programmatic authentication. The Key format is a random string starting with fsk_ .

Request method (hard rules)

  • Neverread out the API Key and write it into commands, arguments, environment variable assignments, or any output—curl -H "Authorization: Bearer fsk_..." such patterns leave the Key in session records and process lists.
  • All requests must go through the skill's bundled script. The script reads the config itself and attaches the authentication header, so the Key never appears on the command line:
node <技能目录>/scripts/fast-ship-api.mjs <METHOD> <path> [body.json] [--verify [读回路径]]
  • When a request body is needed, write the JSON as a UTF-8 file and pass it as the body.json positional argument.
  • --verify [读回路径]: after a write request succeeds (2xx), send a GET once more, output { "response": …, "verify": … }, for post-write read-back verification. By default it GETs the same path; write endpoints with no corresponding GET route (such as internal-meta、recommendation、collab PUT; for batch PUT /api/issues/internal-meta the default read-back will hit GET /issues/:iid and 404) must explicitly provide a read-back path (e.g. for the Issue itself GET /api/issues/:iid). For DELETE, a read-back 404 is treated as confirming deletion.
  • Fallback when the script is unavailable: write the entire Authorization: Bearer <api_key> line into a temporary header file, reference it with curl -H @<header文件> , and when doneimmediately deletethat file.

First use (config persistence)

If ~/.config/fast-ship/config.yaml does not exist,you mustask the user for the following information:

  1. Base URL: Fast Ship service address, e.g. http://localhost:8080 or https://fast-ship.example.com
  2. API Key: a key created from the Fast Ship web UI "Settings → API Key" (starting withfsk_ )

Then write the config to the file:

# ~/.config/fast-ship/config.yaml
base_url: "https://fast-ship.example.com"
api_key: "fsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Note:~/.config the directory usually already exists on macOS/Linux; if it does not, create the directory first.

Subsequent use

The script will read ~/.config/fast-ship/config.yaml from base_url and api_key,on its own and no longer ask the user。Agent Do notread out the Key or write it into commands or output.

Request headers

The script automatically carries the following headers for all requests (no need to add them manually):

Authorization: Bearer <api_key>
Content-Type: application/json; charset=utf-8

Core workflow

When the source is not specified, create source: "internal". Only use source: "github"when the user explicitly asks to sync with GitHub. API Keys can only create internal ones.

For fields, always see references/api.md; only the endpoints are kept here.

  1. GET /api/projects, determine project_id。
  2. before tagging, first GET /api/projects/{id}/issues/repo-labels. If the project has no GitHub repo configured or the labels are empty, use GET /api/projects/{id}/issues/filter-options。
  3. POST /api/projects/{id}/issues to create. For subsequent paths, only use the id(UUID) from the response. The page given to the user is {base_url}/projects/{project_id}/issues/{id}。immediately after creation, GET /api/issues/{id} read back, and check per "request encoding" that the title and body have no \uFFFD—when the writer itself cannot see garbled text, read-back is the only line of defense.
  4. To tag, PUT /api/issues/{iid}; the label name must already exist. Do not rely on workflow_status in the creation request to advance progress.
  5. To advance, use PUT /api/issues/{iid}/internal-meta, with the value todo、in_progress or done。
  6. To query one, use GET /api/issues/{iid}. For listing, use GET /api/projects/{id}/issues。

Screenshot annotations (AI review loop)

Rectangular box annotations drawn on the canvas of the screenshot page are attached tospecific screenshots, for humans/AI to exchange review comments. API Keys can read all annotations, fetch cropped images, and mark as resolved; they cannot create/delete annotations or batch-process (40301), and changing text/linking issues/reopening also requires JWT.

  • List:GET /api/projects/{id}/screenshot-annotations → {items:[...]}, query can be filtered by status(open/resolved)、outdated(true/false)、issue_id、screen_id、platform/locale/theme(comma-separated multiple values,__none__ = unannotated bucket).
  • Issue dimension:GET /api/issues/{iid} the screenshot_annotations[] embeds the annotations linked to that Issue (absent by default).
  • Each annotation carries:image_url(the original screenshot it is on),crop_url(the cropped image of the boxed area, PNG, with margins around it), proportional coordinates x/y/width/height(0~1), pixel coordinates pixel_rect(null when dimensions are unknown),screen_key/screen_title/screen_platform/screen_locale/screen_theme、outdated(pending confirmation after the screenshot is overwritten by an update),status。
  • crop_url/image_url is <img> Direct link path: the script only needs to call with an Authorization header; only the Web side <img> needs ?token=<jwt>。
  • Mark resolved:PUT /api/screenshot-annotations/{aid}, the body as a whole only passes {"status":"resolved"}— including other fields or open will result in 40301.
  • When the original image exceeds the decoding pixel limit (about 64MP), crop returns 40004 (尺寸超出可处理范围); in this case use image_url to fetch the original image and scale it yourself.

AI review closed loop (for field details see the screenshots chapter of api.md):

  1. GET /api/issues/{iid} read screenshot_annotations, or filter by dimension + status=open to fetch project annotations.
  2. By crop_url fetch the cropped image and see which region the user boxed and what comment they wrote.
  3. After modifying the UI,POST /api/projects/{id}/screenshots withthe same screen_key + the same set of platform/locale/theme upload a new screenshot (same variant means overwrite update; the file, width/height, and upload time are replaced; all open annotations on that screenshot are set to outdated=true, awaiting manual "confirm to keep" or, after you confirm the fix is done, set to resolved).
  4. One by one PUT {"status":"resolved"} mark as resolved (for JWT batch scenarios you can use POST /api/projects/{id}/screenshot-annotations/batch; API Key does not have this capability).

Deleting an Issue only clears the annotated issue_id(annotations are kept); deleting a screenshot cascades to delete annotations. As the UI adds or removes elements across versions, use DELETE /api/screenshot-screens/{sid} to clean up outdated screenshots (both JWT / API Key work).

Issue linked PRs

One Issue can have multiple PRs attached (cross-repository is also fine).Timing: attach immediately after creating the PR so the Issue page can show implementation progress; after the PR is merged, call sync once to refresh the status.

  • attach: the body only passes {"url":"https://github.com/<owner>/<repo>/pull/<n>"}, supports /files, query, and other suffixes. The server fetches the title/status/author from GitHub itself; if the fetch fails, no record is written (502). Repeated attach is idempotent and does not produce a second row.attach must be read back to confirm: add --verify /api/issues/{iid} or immediately follow with a GET to confirm pull_requests[] contains that PR before considering it attached — a 502/timeout leaves a gap where you "think it's attached but no record was actually written"; checking only the exit code is not enough.
  • Read: the GET /api/issues/:iid of detail pull_requests[] is the full list; list items carry pull_request_summary {total, open, merged}(closed = total - open - merged)。
  • sync: returns {items, failures}, each PR is an independent failure domain — one that can't be fetched (404/rate limited) only goes into failures[], while the rest refresh normally;failures[].id is the link row id.
  • detach:DELETE /api/issues/:iid/pull-requests/:lid; a nonexistent link returns 40412 (not idempotent; repeated calls will error).
  • PR status and workflow_status are not coupled: all PRs merged does not mean the requirement is complete,internal-meta still has to be advanced by yourself.
  • link_origin=manual links are never mistakenly deleted by the cleanup logic of GitHub sync projection.

Semantic pitfalls and permission division of labor

multipart

These endpoints are curl -F file=@路径, not JSON. The Issue image response contains markdown; paste this segment into the body to actually attach it.

  • POST /api/auth/avatar
  • POST /api/projects/{id}/issues/assets(draft, JWT only)
  • POST /api/issues/{iid}/assets
  • POST /api/versions/{vid}/artifacts(optional form field platform)

Field-level permissions

The security of the spec often lists both JWT and API Key; the actual rejection happens in the handler.

  • API Key cannot pass state / state_reason, cannot POST /api/issues/{iid}/comments, cannot PUT or DELETE /api/issues/{iid}/ship-hook. Doing so is 403 (40301).ship_hook Only appears in the GET and list of an Issue, read-only.
  • PUT /api/issues/{iid}/collab/consensus、PUT /api/issues/{iid}/collab/summary、PUT /api/issues/{iid}/recommendation Only accepts an API Key. A JWT call returns 403 (40303).
  • After a recommendation is deferred by the user,PUT recommendation returns 409 (40911)—do not retry the recommendation, and do not attempt DELETE (also 40911).PUT/DELETE /api/issues/{iid}/recommendation/defer is defer/resume, JWT only (API Key 40301). Permanently removing a deferred item can only be done by a JWT user.
  • POST /api/projects/{id}/logs Only accepts an API Key. A JWT call returns 403 (40303).

Own logs are not project logs

GET /api/self-logs、/aggregate、/trace queries the Fast Ship server's own slog (INT-94). Project runtime logs still go through /api/projects/{id}/logs。fsr_ A token querying its own logs returns 40301. For failed requests use the response header X-Request-Id call /trace?request_id=; to review the run chain use run_id。

checklist is a whole-group replacement

PUT /api/issues/{iid}/checklist The items submitted is the final list. Old entries not included will be deleted.items=[] will clear the list.

q is in-memory full filtering

GET /api/projects/{id}/issues The q is not an index query. It scans the full set, matching title, body, author login,INT-xxx / GH-xxx. Pure digits also match sequence_number or the GitHub number.

Details include collab

GET /api/issues/{iid} The data contains collab(consensus and summary). List items do not. To view the collaboration area, just read the details; no need to call GET /collab。

Batch workflow changes

PUT /api/issues/internal-meta The request body is {items:[{issue_id, workflow_status}]}, up to 200 entries. If one entry fails, the whole batch does not become a 4xx; HTTP remains 200, see failures[]。

collab read before write

PUT GET before consensus or summary. Do not write back blocks the user has already cleared.DELETE is idempotent; if the target does not exist, it also returns 200.

Do not write consensus while follow-up questions are still ongoing. After the decision questions are done and the user confirms work can start, then PUT the finalized content. If the user says stop asking and just do it, leave the consensus empty; do not make up 'implement per the Issue text'. Do not close the ticket without permission, and do not commit or push code.

Write the completion summary for ordinary people to read; two paragraphs are enough: how it was before, how it is now. Do not list files, do not paste the commit SHA, do not write a test checklist. If the changes have not yet landed on a perceptible result, do not write 'now' yet.

Request encoding (hard rules for write operations)

  • Always write the request body as a UTF-8 JSON file, and pass it via the script's body.json positional argument; Chinese or any other non-ASCII in titles, bodies, or paths must not go into command-line arguments.
  • Windows / CP936 environments are especially dangerous: cmd and PowerShell convert inline Chinese according to the local code page; after UTF-8 bytes are decoded a second time, what gets written to the database is U+FFFD(\uFFFD) plus residual GBK bytes, and the original text is unrecoverable. On PC environments there is no exception to this rule.
  • Every write operation must be read back and verified: add --verify(or follow with a GET) to confirm the read-back title and body are normal Chinese and contain no \uFFFDand no ?? or similar replacement traces. Looking only at code:0 success is not enough—the server accepts the replacement characters as-is and still returns success.
  • If the read-back shows garbled text, rebuild it on the spot from the original text (the PR review body, the original UTF-8 source such as the GitHub issue); do not assert 'it is just a terminal display problem': replacement characters written to the database will not recover just by switching terminals.

Breaking Changes

  • API Key Cannotvia PUT /api/issues/:issue_id modify state / state_reason(open/close); the Agent should instead use PUT /api/issues/:issue_id/internal-meta in workflow_status to mark completion; open/close are performed by the JWT user on the Web side.
  • API Key Cannotpost comments (POST /api/issues/:issue_id/comments)。
  • API Key Cannot PUT/DELETE /api/issues/:issue_id/ship-hook。ship_hook appears only in Issue GET/list for read-only purposes. After shipping, closing the ticket/leaving a message is configured by the JWT user on the Web, and executed by the server after successful shipping.
  • The legacy collaboration area endpoint POST/PUT/DELETE /collab/notes、/collab/questions has been removed;suggestions、plan、review and commit_ids are deprecated together. The current GET /collab only returns consensus and summary。