Repository navigation
docs: the contract, the seam list and the @experimental tags name different interfaces #340
Copy link
Copy link
Closed
Labels
agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.Context and acceptance criteria are complete enough for an agent to take this unattended.area: corepackages/core: the brain CLI, indexer, hybrid search, config, taxonomy, skills.packages/core: the brain CLI, indexer, hybrid search, config, taxonomy, skills.area: docsThe docs/ tree and the README / AGENTS / CONTRIBUTING surfaces.The docs/ tree and the README / AGENTS / CONTRIBUTING surfaces.area: scrapePolite HTTP, robots.txt, headless Chrome, site adapters.Polite HTTP, robots.txt, headless Chrome, site adapters.area: ui-sdkWire protocol, runtime schemas, the server and client SDK surfaces.Wire protocol, runtime schemas, the server and client SDK surfaces.contractTouches the integration contract: CONTRACT: commit, contract doc updated in the same commit.Touches the integration contract: CONTRACT: commit, contract doc updated in the same commit.type: docsDocumentation only.Documentation only.
Milestone
Description
Context
Part of #56. Found by the 1.0 surface audit (#319), against main @ 550a41ef.
Three documents each list the extension interfaces 1.0 would freeze, and they
list different sets:
docs/integration-contract.md:574-576namesEmbeddingProvider,
CompletionProvider,AgentRunner,SkillEmitter"and the ui-sdk
interfaces". It does not nameSiteAdapter(packages/scrape/src/adapter/types.ts:66)
at all, and "the ui-sdk interfaces" does not say which of the package's
~1,050 exported names (api-report/ui-sdk.txt) it means.docs/extending/README.md:62says "All seams are marked@experimentaluntil
1.0". Of the nine seams it documents at:69-108, none carries its own tag:- the four core seams (
packages/core/src/lib/seams.ts:22,:37,:54,
:97) are covered only by a file-header comment atseams.ts:2, which a
type checker and an editor tooltip never attach to the symbol; AgentBackend(packages/ui-sdk/src/server/backend.ts:371), and the
BackendBridge(:123) andBackendCapabilities(:51) it is made of,
are untagged, while eight of their members and helpers are tagged
(:98,:254-287,:335,:359,:422);SpeechProvider(packages/ui-sdk/src/server/speech.ts:20),AsrClient
(packages/ui-sdk/src/client/asr.ts:15),ToolRendererandRendererPack
(packages/ui-sdk/src/client/renderers.ts:44,:68) andSiteAdapter
are untagged. OnlyBackendModule(packages/ui-sdk/src/server/backend-module.ts:151)
is tagged the way the Stability section says every seam is.
- the four core seams (
- Nothing checks that the three agree, so they drifted apart one additive
change at a time.
The same pass found three stale statements in the documents 1.0 would freeze:
packages/ui-sdk/README.md:25says "Protocol rev 3";PROTOCOL_REVis 4
(packages/ui-sdk/src/protocol.ts:44).- The
brain jobs scrape --jsonexample atdocs/integration-contract.md:135
and:172usesremoteineurope, the board 97d19d9 retired. - The Consumers table (
docs/integration-contract.md:25) says brain.db is read
for voice keyterms;packages/ui-server/src/graph/reader.tsalso reads the
graph_*tables the brain.db section documents.
Which exports belong in the frozen set beyond the nine documented seams (the
permission-gate, confirm-pattern and subprocess-env helpers, VOICE_ALLOWED_TOOLS,
DocumentRenderer, the module manifest) is a judgement. It is not part of
this issue. #343 holds those questions.
Scope
- Put an individual
@experimentalTSDoc tag on each declaration of the nine
documented seams, and on the types a seam is made of (BackendBridge,
BackendCapabilities,StartTurnRequest,RendererPack,SpeechSession,
AsrClientOptions,AdapterResult,ScrapeContext). The per-symbol tags
replace the file-header comment inseams.ts. - Rewrite
docs/integration-contract.md"Extension interfaces" to name every
seam and the package that exports it, instead of "the ui-sdk interfaces". - Fix the three stale statements above.
- Add a test that reads the seam list in
docs/extending/README.md, the list in
docs/integration-contract.md"Extension interfaces", and the
@experimentaltags on exported declarations, and fails naming any seam
that appears in one and not the others.
Out of scope
- Deciding whether the tagged-but-undocumented helpers stay in the frozen set.
That is docs: decide what 1.0 freezes where the contract document does not say #343. This issue tags only what is
documented today. - Changing any interface's shape.
- Removing
@experimentalanywhere. That happens at 1.0.
Acceptance criteria
- Every declaration listed under Scope carries its own
@experimentaltag,
andseams.tsno longer relies on a file-header comment. -
docs/integration-contract.md"Extension interfaces" names each of the
nine seams by interface and package. -
packages/ui-sdk/README.mdstates rev 4; the scrape example names a board
that exists; the Consumers row names the graph reader. - The new test fails when the tag is removed from one seam (for example
SiteAdapter), and when a seam is deleted from either document. Each
mutation and its failing assertion is recorded in the PR.
Verification
bun run test including the new test; the mutation receipts in the PR.
Contract impact
- This touches the integration contract, so it needs the
contractlabel, aCONTRACT:commit prefix, and the doc updated in the same commit. - This changes a published package's behaviour, so it needs a changeset.
The contract edit is wording and classification only: no shape changes.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.Context and acceptance criteria are complete enough for an agent to take this unattended.area: corepackages/core: the brain CLI, indexer, hybrid search, config, taxonomy, skills.packages/core: the brain CLI, indexer, hybrid search, config, taxonomy, skills.area: docsThe docs/ tree and the README / AGENTS / CONTRIBUTING surfaces.The docs/ tree and the README / AGENTS / CONTRIBUTING surfaces.area: scrapePolite HTTP, robots.txt, headless Chrome, site adapters.Polite HTTP, robots.txt, headless Chrome, site adapters.area: ui-sdkWire protocol, runtime schemas, the server and client SDK surfaces.Wire protocol, runtime schemas, the server and client SDK surfaces.contractTouches the integration contract: CONTRACT: commit, contract doc updated in the same commit.Touches the integration contract: CONTRACT: commit, contract doc updated in the same commit.type: docsDocumentation only.Documentation only.
Activity
CONTRACT: docs: say which seam parts are tagged, and that SiteAdapter…
docs(module-jobs): stop counting the boards in PageLedger's comment
CONTRACT: docs: name each extension seam, and tag it where it is decl…
CONTRACT: docs: correct three stale statements the 1.0 audit found
CONTRACT: docs: say which seam parts are tagged, and that SiteAdapter…
docs(module-jobs): stop counting the boards in PageLedger's comment
CONTRACT: docs: name each extension seam, and tag it where it is decl…