Add Cloud Agent development environment - #2
Merged
Conversation
Co-authored-by: Anurag Roy <anuragroy@duck.com>
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
Adds a
.cursor/environment.jsonso Cloud Agents get a fully working Speak-O development environment.Speak-O is a self-contained WXT + React MV3 Chrome extension. It has no backend, database, or external service required for development — the test suite uses fakes and never needs an ElevenLabs Provider Credential. The environment therefore only needs the Node/npm toolchain (already present in the base image) plus project dependencies.
{ "name": "Speak-O", "install": "npm ci" }install: npm ciperforms a clean, lockfile-pinned dependency install and runs thepostinstallhook (wxt prepare) that generates WXT types. It is idempotent by construction.start/terminals: there are no long-running services required per boot. The dev server (npm run dev) launches Chrome interactively and is developer-initiated, so it does not belong in automatic startup.Validation
Performed on the Cloud Agent VM (Node v22.14.0, npm 10.9.7):
npm ci(install)npm run typecheck(tsc --noEmit)npm test(vitest)npm run build(wxt build).output/chrome-mv3npm run zipspeak-o-0.1.0-chrome.zipnpm run audit:zipnpm ci)End-to-end demonstration
The environment-built extension (
.output/chrome-mv3) was loaded in Chrome and exercised on a local article:chrome://extensionswith no errors.Speak-O loaded in chrome://extensions with no errors
Speak-O onboarding prompt on the extracted article
Speak-O reader control bar rendered on the article
Speak-O settings UI
speako_settings_ui_walkthrough.mp4
Audible narration / synchronized highlighting could not be exercised because Chrome's
chrome.ttsfinds no system voices in the headless VM (Web SpeechgetVoices()returns 0 even after installingespeak-ng/speech-dispatcher; Chrome cannot reach the speech backend without a session D-Bus). This is a runtime-media limitation of the headless environment, not a defect in thenpm cidev environment, which needs no audio to build, type-check, test, or develop.Pre-existing failing test (not an environment issue)
tests/extraction/x-articles.test.tshas one failing assertion onmain(empty diff frommainreproduces it).mappedBlockFromElementinsrc/extraction/dom-mapping.tsconcatenates text-node slices verbatim, so a paragraph split across fixture lines keeps interior newlines/indentation instead of collapsing them to single spaces. This is deterministic application behavior independent of Node/npm/jsdom versions, so it is out of scope for environment setup and left unchanged.To show artifacts inline, enable in settings.