twocents

v1.0.1
page.twocents/twocents Checked 2 days ago Published 4 months ago

Human feedback for AI agents: share HTML, get a live review link, read anchored notes as markdown.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

share_page Share a page for visual feedback

Share a page or document and get back a review link to send to people. Pass "html" for a self-contained page, or "markdown" for a plan, spec, PR description or report — markdown is rendered to a styled, readable document for you, so prefer it whenever the thing you want a human to approve is prose rather than a built page. Reviewers open the link and pin notes directly on it — no login or install. Call again with the same room id to update the page; connected reviewers see the update live. Use get_feedback to collect the notes. Rooms are sticky per project: if the project has a .twocents/s…

ParameterTypeDescription
creatorKeystringOnly needed to change "forkable" on a room you created in an EARLIER session — the key that share_page returned then. New rooms are claimed automatically.
forkablebooleanWhether reviewers may take their own copy of this page to work on (default true). Pass false for something you are circulating for comment but do not want handed onward — it hides the Fork button an…
htmlstringA complete, self-contained HTML document (inline CSS/JS/images — no local file references, they will 404 for reviewers). Max ~120 KB.
markdownstringMarkdown to render as a document, instead of "html". Use this for plans, specs, PR descriptions, summaries — anything you want a human to read and approve before you act. Pass exactly one of html or…
pathstringFor multi-page sets: the filename this content lives at in the room (e.g. "about.html" or "plan.md"). Defaults to "index.html", the page reviewers land on. For a set of more than one page prefer share…
roomstringRoom id from a previous share_page call, to update that page. Omit to create a new room.
sourcestringWhere this content came from, for whoever reads the feedback later — a project path like "DROPS.md" or "public/p/foo/index.html", or a note like "drafted in this conversation, not yet a file". You a…

share_pages Share a whole set of pages in one request

Publish a multi-page set — an entry page plus the pages it links to — into one room as a single atomic operation. Either the whole set lands or nothing changes, so a reviewer never opens a page whose links point at pages that were never stored. Use this instead of calling share_page N times whenever you have more than one page. Note the ceiling: a room is a review set, not a host — it holds 200 pages and 6 MB total. For a large generated corpus, share the entry points a human would actually read and link out to the rest; nobody pins notes on four hundred pages. If the pages are already f…

ParameterTypeDescription
pages *arrayThe pages of this set. Each item needs a "path" (the filename in the room, e.g. "index.html" or "plan.md") plus exactly one of "html" or "markdown". Link between them with plain relative hrefs; format…
creatorKeystringOnly to change "forkable" on a room created in an earlier session.
entrystringWhich page reviewers land on, if it is not already "index.html". Must be one of the paths in "pages"; its content is also stored as index.html so the review link opens it.
forkablebooleanWhether reviewers may take their own copy of this set (default true). Pass false to hide the Fork button and make the fork command refuse. A stated intent, not a lock.
prunebooleanDelete pages already stored in this room that are not in this request. Use it when republishing a set whose layout changed, so stale pages from the old layout do not linger unreachable. Default false…
roomstringRoom id to publish into. Omit to create a new room.

get_feedback Get reviewer feedback for a shared page

Fetch the reviewer notes for a page shared with share_page, as markdown grouped by page. Each note carries the anchored text, the element and its markup as the reviewer saw it, so you can locate and apply it; each page heading carries a URL to read the whole page back, so you never have to guess which file it is. Show your human each new note and apply only the ones they approve. Pass the note ids already decided in earlier sessions as "handled" to see only what is new.

ParameterTypeDescription
room *stringThe room id returned by share_page.
handledarrayNote ids the creator already decided on (applied or skipped) — e.g. the keys of a saved .twocents/decisions.json. These are summarized in one line each instead of repeated in full, so the response l…

resolve_feedback Mark reviewer notes as addressed

Mark notes resolved once you have actually applied them. This is what closes the loop: the note leaves the active list for every later get_feedback, and the reviewer who wrote it sees it marked resolved on the page — live, if they have it open — instead of finding their old note sitting next to content you already fixed. Pass "what" you changed; that sentence is shown to the reviewer, so write it for them, not for the log. Requires the creatorKey that share_page returned when the room was created — the review link alone cannot resolve, or any reader could clear feedback that was not thei…

ParameterTypeDescription
creatorKey *stringThe room's creator key, returned by share_page when the room was created and kept in .twocents/state.json. For a room created before creator keys existed, the first key you present claims the room.
ids *arrayNote ids to resolve — the `id:` field of each note in get_feedback output.
room *stringThe room id the notes belong to.
bystringWho applied it, if you want it credited. Max 80 chars.
resolvedbooleanDefaults to true. Pass false to reopen a note you resolved by mistake.
whatstringOne sentence on what you changed, shown to the reviewer beside their note. Max 400 chars.