Skip to content

Add Cloud Agent development environment - #2

Merged
anurag-roy merged 1 commit into
mainfrom
cursor/setup-cloud-agent-environment-cf5c
Aug 24, 2026
Merged

Add Cloud Agent development environment#2
anurag-roy merged 1 commit into
mainfrom
cursor/setup-cloud-agent-environment-cf5c

Conversation

@anurag-roy

@anurag-roy anurag-roy commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a .cursor/environment.json so 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 ci performs a clean, lockfile-pinned dependency install and runs the postinstall hook (wxt prepare) that generates WXT types. It is idempotent by construction.
  • No 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):

Check Result
npm ci (install) Passed; idempotent (run twice)
npm run typecheck (tsc --noEmit) Passed
npm test (vitest) 40/41 passed
npm run build (wxt build) Passed; emits .output/chrome-mv3
npm run zip Passed; emits speak-o-0.1.0-chrome.zip
npm run audit:zip Passed; 18 files, permissions accepted
Draft environment build (npm ci) SUCCEEDED

End-to-end demonstration

The environment-built extension (.output/chrome-mv3) was loaded in Chrome and exercised on a local article:

  • Loaded in chrome://extensions with no errors.
  • Injected its content script, extracted a real article, and rendered the first-use onboarding prompt.
  • Rendered the floating reader control bar on the article after choosing Chrome Voice.
  • The settings UI (a built React app) renders, navigates all sections, and persists a preference ("Preferences saved locally").

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.tts finds no system voices in the headless VM (Web Speech getVoices() returns 0 even after installing espeak-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 the npm ci dev 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.ts has one failing assertion on main (empty diff from main reproduces it). mappedBlockFromElement in src/extraction/dom-mapping.ts concatenates 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.

Open in Web Open in Cursor 

Co-authored-by: Anurag Roy <anuragroy@duck.com>
@anurag-roy
anurag-roy marked this pull request as ready for review August 24, 2026 12:32
@anurag-roy
anurag-roy merged commit 416ac26 into main Aug 24, 2026
1 check failed
@anurag-roy
anurag-roy deleted the cursor/setup-cloud-agent-environment-cf5c branch August 24, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants