@staff0rd/assist 0.885.2 → 0.886.0
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/README.md
CHANGED
|
@@ -47,7 +47,7 @@ The user guide is a static site built from JSON pages in `docs/guide/pages/` and
|
|
|
47
47
|
- **Screenshots** — each screenshot declares a `route`, and optionally `viewport` (default 1280×800), `theme`, `waitFor` and `crop` selectors, a `scene` (a named list of setup steps in `docs/guide/capture/scenes.json`), `setup` steps run after the scene, and `actions` (`{ "click": "<selector>" }`, `{ "press": "<key>" }`) performed on the page before capture. Setup steps: `{ "assist": [args] }` runs an assist command in the sandbox, `{ "run": "<name>" }` starts a run session from `docs/guide/capture/assist.yml`, and `{ "session": { repo, prompt, title?, reply?, status? } }` starts an agent session in the `sandbox`, `api` or `website` repo and sets its status (`running`, `waiting` or `done`). The capture puts a fake `claude` (`docs/guide/capture/bin/claude`) on the `PATH`, which prints the step's `reply` lines as its transcript and answers title generation with its `title`, so no real harness runs. Screenshots sharing a scene and setup are captured together, and the sessions are drained before the next state is set up. Without a `theme`, it is captured as `<file>` (light) and `<file>-dark.png`, and the site shows the one matching the reader's colour scheme. A `{{screenshot:<file>}}` line in the section's markdown places the screenshot there; otherwise it follows the section's text.
|
|
48
48
|
- **Recapture** — `npm run docs:capture [-- <file.png>...] [--skip-build] [--keep-home]` builds assist, starts a throwaway Postgres container (Docker required), clones `staff0rd/sandbox` (plus local `api` and `website` repos) into a temporary `HOME`, runs the real daemon and web server there on a free port, captures the screenshots with Playwright (`npx playwright install chromium` once) and tears everything down. Commit the changed PNGs.
|
|
49
49
|
- **Preview** — `npm run docs:build [-- --base <path>]` renders the site into `.docs-site/`, and `npm run docs:preview` builds and serves it on port 4173, rebuilding and reloading open tabs when a page, screenshot or the stylesheet changes.
|
|
50
|
-
- **Feedback** — run `
|
|
50
|
+
- **Feedback** — start the `docs` run entry (a `server: docs` run of `docs:preview` on port 4173) from the dashboard and open the preview in Firefox with the [assist browser extension](#docs-feedback) installed. Select text on a page, press the assist icon next to the selection, type a prompt and press **Enter**: it arrives as a user prompt naming the page id, section heading and source JSON file, with the selected text quoted, in the live Claude session that most recently wrote that page's JSON (or, failing that, anything under `docs/guide/`).
|
|
51
51
|
|
|
52
52
|
## Claude Commands
|
|
53
53
|
|
|
@@ -590,7 +590,7 @@ Sending is Firefox-only (it relies on the `browser.*` promise APIs). The web ser
|
|
|
590
590
|
|
|
591
591
|
### Docs feedback
|
|
592
592
|
|
|
593
|
-
`npm run docs:preview` stamps each page with `<meta name="assist-docs-page">` (the page id) and
|
|
593
|
+
`npm run docs:preview` stamps each page with `<meta name="assist-docs-page">` (the page id) and marks each section with `data-docs-heading` and `data-docs-source` (its JSON file); `docs:build` output carries none of these. The `docs.js` content script runs on any `localhost` / `127.0.0.1` page but only activates on one with the page meta. Selecting text inside a section shows a small assist icon by the selection; pressing it opens the same prompt popover, and **Enter** sends a non-empty prompt. The background script POSTs `{ pageId, heading, source, selection, prompt }` to `POST /api/sessions/docs-feedback`, which asks the daemon (`type-prompt-to-writer`) to paste the prompt into the live session whose Claude transcript has the newest Write/Edit of `source`, else of any file under `docs/guide/`, and submit it. A toast names the session, or reports a 404 when no live session has written the docs.
|
|
594
594
|
|
|
595
595
|
### Permanent Firefox install
|
|
596
596
|
|