docs: document per-turn page context for website chat

Open Beginner friendly
#131 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
documentation

Research direction

Start by reading the runtime repository’s docs/page-context-contract.md, which is named as the source of truth. Find the official documentation pages covering WebSocket chat.send and website chat POST chat, then document the support negotiation, v1 envelope, errors, and per-message handling described in this issue. Done when the docs cover those requirements and clarify that CLI and MCP do not use page context.

Written by the indexing model from the issue text.

Description

ai-handle

Website chat hosts (the embedded webchat and the browser extension) can now attach context from the current page to a single chat message (nextlevelbuilder/dewee#2228). The official docs should cover this:

  • Where to send it. pageContext on WebSocket chat.send, or page_context in the website chat POST chat body.
  • How to discover support. WebSocket connect returns page_context_versions. Website chat config returns page_context.versions. Hosts attach a page context only when version 1 is listed.
  • Envelope v1. version and url are required. title, description, captured_at, selection and content are optional. The encoded envelope must be at most 32 KiB, and unknown fields are rejected.
  • Errors. page_context_invalid and page_context_unsupported. Either error rejects the whole send.
  • How the agent treats it. It is untrusted page data for that one message only. It is not saved to chat history, summaries or memory, and it does not change tools or permissions.
  • CLI and MCP. They do not apply: they run without a web page.

Source of truth: docs/page-context-contract.md in the runtime repository.

Dominant language
TypeScript
Stars
2
Forks
2
Avg merge
1d 15h
Merged PRs (30d)
63

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextlevelbuilder/dewee-web-v2

All issues in nextlevelbuilder/dewee-web-v2

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.