Skip to Content
TestingVoice Iterate Widget (preview)

Voice Iterate Widget (preview)

Repository contains embeddable Web Component that captures typed or browser-transcribed instruction, submits to owned OpenFactory app, polls resulting repair ticket. Integration preview-only.

Package source in tools/voice-iterate in OpenFactory monorepo. Do not assume @openfactory/voice-iterate or CDN bundle publicly published; build and pin reviewed artifact from repository until release explicitly listed in package registry.

Current boundary

Endpoint accepts instruction for app with Git source and dispatches shared repair workflow. Stage 0 changes deployed sandbox copy and can redeploy preview. Does not guarantee change committed to upstream repository. Ticket marked done proves only recorded agent task outcome; review result and verify app yourself.

Service allows at most two in-flight iterations per app. Additional requests return 429 until ticket reaches terminal state.

Prerequisites

  • Owned OpenFactory app with source.git_url.
  • Real account; guest sessions cannot dispatch autonomous code edits.
  • of_mcp_ account key kept on server, never in browser JavaScript.
  • HTTPS or localhost development origin if microphone input used.

Build widget from source

From monorepo:

cd tools/voice-iterate npm ci npm test npm run lint npm run build

Vendor resulting versioned bundle or install from own controlled registry. Record source commit and checksum used by application.

Use same-origin proxy

Browser-facing widget calls:

POST {endpoint}/iterate GET {endpoint}/agent-status GET {endpoint}/agent-status?thread_id={thread_id}

Server should pin target app ID and forward those requests to:

POST https://console.openfactory.tech/api/apps/{APP_ID}/iterate GET https://console.openfactory.tech/api/apps/{APP_ID}/agent-status

Attach Authorization: Bearer <of_mcp_key> only on server. Authenticate and rate-limit own proxy users; otherwise every visitor able to reach route can spend account authority on changes to pinned app. Allow only three paths and two methods above, enforce request-size limits, do not forward arbitrary headers or app IDs.

Mount locally built module with proxy endpoint:

import { createVoiceIterate } from './vendor/openfactory-voice-iterate/index.mjs'; const widget = createVoiceIterate({ appId: '550e8400-e29b-41d4-a716-446655440000', endpoint: '/api/voice-iterate', fallback: 'text', onStatusChange: ({ status, thread }) => { console.log(status, thread.taskResult); }, });

Custom element and styles run in Shadow DOM. Default text fallback remains usable when browser speech recognition unavailable. Browser speech services and privacy behavior vary by browser and deployment; obtain consent and test exact supported browser set. OpenFactory receives resulting text on this path, while browser or configured speech service may process audio separately.

Acceptance test

  1. Submit harmless, reversible change against non-production app.
  2. Confirm proxy cannot target any other app and rejects unauthenticated callers.
  3. Observe queued/working through terminal done, failed, lost, or stale state.
  4. Inspect task result and preview manually.
  5. Confirm upstream Git repository unchanged unless separate, reviewed source-persistence workflow reports commit or pull request.
  6. Revert or rebuild sandbox from canonical source.

See Prompt-to-app agent and App deployment for same persistence and promotion boundaries.