docs: add public bridge API reference#16
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a first-class public API reference for the browser-facing LlamaWebGpuBridge assets and introduces CI contract checks to keep the docs and generated declaration assets aligned with the actual exported surface.
Changes:
- Added
docs/api.mddocumenting the public JS API, including worker vs direct-runtime behavior and state persistence semantics. - Linked the API reference and declaration asset (
js/llama_webgpu_bridge.d.ts) fromREADME.md. - Hardened
scripts/verify_ci_reliability.pyto enforce API-doc coverage and detect malformed Markdown table rows; also exposed/forwarded a few public config keys and regenerated bundled JS /.d.tsoutputs.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/verify_ci_reliability.py | Adds API-doc coverage checks and a Markdown table row validator for docs/api.md. |
| README.md | Links the new public API reference and documents the published .d.ts asset. |
| js/src/llama_webgpu_bridge.js | Forwards additional public config keys into worker config. |
| js/src/llama_webgpu_bridge.d.ts | Exposes workerGenerationStallTimeoutMs on the public config type. |
| js/llama_webgpu_bridge.js | Regenerated bundled bridge output reflecting forwarded config keys. |
| js/llama_webgpu_bridge.d.ts | Regenerated published declaration asset. |
| docs/api.md | New public API reference for LlamaWebGpuBridge. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/api.mdas the public JavaScript API reference forLlamaWebGpuBridge.README.mdand describe the generated declaration asset.workerGenerationStallTimeoutMs, forward declared worker config keys, and regenerate generated JS/declaration assets.Closes #11
Test Plan
python3 -m py_compile scripts/verify_state_persistence_api.py scripts/verify_ci_reliability.py scripts/state_persistence_browser_smoke.pypython3 scripts/verify_state_persistence_api.pypython3 scripts/verify_ci_reliability.pynpm run check:jsgit diff --checkReview Notes