Skip to content

docs: add script-the-api guide (guides checkpoint 8)#43

Merged
BunsDev merged 3 commits into
mainfrom
docs/guides-script-api
Jul 22, 2026
Merged

docs: add script-the-api guide (guides checkpoint 8)#43
BunsDev merged 3 commits into
mainfrom
docs/guides-script-api

Conversation

@BunsDev

@BunsDev BunsDev commented Jul 22, 2026

Copy link
Copy Markdown
Member

Final checkpoint of the Guides section (#34). Stacked on #42.

Adds Script the API — the minimal correct client loop for the daemon socket API:

  1. Health handshake (ok / apiVersion / capabilities check)
  2. List sessions (GET /api/v1/sessions, snake_case record shape)
  3. Launch a session (POST /api/v1/sessions body fields, project-boundary validation)
  4. Follow events with the afterSeq cursor (persist nextCursor.afterSeq, limit cap 1000)
  5. Branch on the error envelope (error.code, stable code table)

Every endpoint, field name, and error code verified against reference/api.mdx and openapi/coven.daemon.v1.yaml.

Also: links the last catalog row in guides/index.mdx, registers the page in guides/meta.json, extends check-guides-docs.mjs (page + 5 mention pins + API-reference cross-link assertion).

Validation: all 5 doc check scripts + validate-links (0 errors), tsc --noEmit, next build with script-the-api.html prerender verified.

This completes the 8-checkpoint chain: #34#37#38#39#40#41#42 → this.

End-to-end guide to scripting the daemon socket API with curl: health
handshake, listing sessions, launching a session, following events with
the afterSeq cursor, and branching on the structured error envelope.
Verified against reference/api.mdx and openapi/coven.daemon.v1.yaml.

Links the final catalog row and extends check-guides-docs.mjs pins.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 22, 2026 00:17
@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
coven-docs Ready Ready Preview Jul 22, 2026 12:35am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the final Guides checkpoint by introducing a new “Script the API” walkthrough under content/docs/guides/, documenting a minimal, correct client loop for interacting with the Coven daemon’s local socket HTTP API.

Changes:

  • Add a new guide page covering health handshake, session listing/launch, event pagination via afterSeq, and structured error handling.
  • Register the new guide in the Guides nav and catalog index.
  • Extend the Guides validation script with required-page/mention pins and an API-reference cross-link assertion.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
scripts/check-guides-docs.mjs Adds script-the-api to required pages, pins key API strings, and asserts a required link to the API reference.
content/docs/guides/script-the-api.mdx New step-by-step guide for scripting the daemon API with curl, including events cursor and error envelope examples.
content/docs/guides/meta.json Registers the new guide page in the Guides section navigation.
content/docs/guides/index.mdx Links the “Script the API” row in the Guides catalog table.

Comment thread content/docs/guides/script-the-api.mdx Outdated
Comment thread content/docs/guides/script-the-api.mdx Outdated
BunsDev and others added 2 commits July 21, 2026 19:33
- Event loop step now covers nextCursor: null (empty page) so client
  loops keep their previous cursor instead of crashing
- runtime_unavailable described as retryable 503, not retry-after-status

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@BunsDev
BunsDev changed the base branch from docs/guides-upgrade to main July 22, 2026 00:40
@BunsDev
BunsDev merged commit 2df8908 into main Jul 22, 2026
1 check passed
@BunsDev
BunsDev deleted the docs/guides-script-api branch July 22, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants