Build capability-scoped browser JavaScript actor runtime #105

Closed
opened 2026-07-26 21:16:31 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-07-26 21:16:31 +00:00 (Migrated from github.com)

Goal

Extract actor execution from the current one-shot source-string worker into a reusable browser JavaScript actor framework.

The runtime supports Quasar actors, research nodes, future packaged actors, and agent-created actors without granting direct access to Cytoscape or PouchDB.

Runtime contract

An actor manifest declares:

  • stable ID, label, version, runtime version, and source
  • accepted StarIntel object types and selection bounds
  • explicit capabilities
  • timeout, output, request, and response-size limits
  • triggers and optional research-node compatibility

The actor runs inside a dedicated Web Worker and receives cloned context plus a capability API. Host services are requested over message RPC.

Initial capabilities:

  • documents.get
  • documents.query
  • network.fetch
  • browser.open
  • events.emit
  • artifacts.write

Actor results may contain:

  • validated StarIntel documents
  • transform operations
  • artifacts
  • message and metrics

Security boundary

The first implementation is a capability gate and resource boundary, not a complete hostile-code sandbox. Obvious ambient network APIs are removed inside the worker and supported effects route through host RPC. Truly untrusted actors still require stronger isolation such as a separate origin, SES/Compartment, or a server-side runner.

Lifecycle

Structured events cover start, progress, log, capability request, completion, failure, timeout, abort, and worker crash.

Acceptance

  • normalized browser actor manifest and limits
  • dedicated-worker runtime with timeout and abort
  • capability RPC with deny-by-default dispatch
  • bounded result envelope and response sizes
  • lifecycle event stream
  • compatibility adapter for existing Quasar actor manifests
  • tests for validation, denial, timeout, abort, and output limits
  • docs and migration plan for src/lib/actors.js
  • green Quasar static, unit, integration, build, and Playwright CI

Implemented by PR #106.

## Goal Extract actor execution from the current one-shot source-string worker into a reusable browser JavaScript actor framework. The runtime supports Quasar actors, research nodes, future packaged actors, and agent-created actors without granting direct access to Cytoscape or PouchDB. ## Runtime contract An actor manifest declares: - stable ID, label, version, runtime version, and source - accepted StarIntel object types and selection bounds - explicit capabilities - timeout, output, request, and response-size limits - triggers and optional research-node compatibility The actor runs inside a dedicated Web Worker and receives cloned context plus a capability API. Host services are requested over message RPC. Initial capabilities: - `documents.get` - `documents.query` - `network.fetch` - `browser.open` - `events.emit` - `artifacts.write` Actor results may contain: - validated StarIntel documents - transform operations - artifacts - message and metrics ## Security boundary The first implementation is a capability gate and resource boundary, not a complete hostile-code sandbox. Obvious ambient network APIs are removed inside the worker and supported effects route through host RPC. Truly untrusted actors still require stronger isolation such as a separate origin, SES/Compartment, or a server-side runner. ## Lifecycle Structured events cover start, progress, log, capability request, completion, failure, timeout, abort, and worker crash. ## Acceptance - [x] normalized browser actor manifest and limits - [x] dedicated-worker runtime with timeout and abort - [x] capability RPC with deny-by-default dispatch - [x] bounded result envelope and response sizes - [x] lifecycle event stream - [x] compatibility adapter for existing Quasar actor manifests - [x] tests for validation, denial, timeout, abort, and output limits - [x] docs and migration plan for `src/lib/actors.js` - [x] green Quasar static, unit, integration, build, and Playwright CI Implemented by PR #106.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/quasar-ui#105
No description provided.