Skip to content

Add the Interactor artifact compiler - #323

Draft
cowboyd wants to merge 3 commits into
codex/interactor-metadatafrom
codex/interactors-compile
Draft

cowboyd wants to merge 3 commits into
codex/interactor-metadatafrom
codex/interactors-compile

Conversation

@cowboyd

@cowboyd cowboyd commented Sep 4, 2026

Copy link
Copy Markdown
Member

Motivation

Playwright and other out-of-process browser runners cannot directly use Interactor constructors defined in the test process. They need a small, deterministic artifact boundary that preserves the Interactor API while placing its implementation in the browser.

Approach

Add a Deno-first interactors compile command and programmatic API that discovers named Interactor and matcher exports through constructor metadata. It emits exactly three coordinated artifacts: a self-contained browser agent, a versioned and hashed JSON registry, and type-only declarations. Compilation validates browser dependencies, public definition names, reserved methods, and registry ambiguity before writing output.

Define the command tree with Configliere, including its positional entrypoint, output-directory option, generated help, and diagnostics. The runtime bundle and declaration types are vendored from Configliere PR #27 at commit 7ea47ca0e3026356285f3f6f4b95f24d3a4ff7b7, with reproduction instructions and MIT attribution.

Alternate Designs

Loading project source directly from every test runner would make runner configuration and dependency resolution part of the protocol. Generating a runner-specific JavaScript API was also considered, but a registry plus declarations lets each adapter provide its native transport without duplicating the public types.

Depending directly on an unpublished Configliere preview would make installation depend on a mutable experimental package. Vendoring the pinned build keeps this layer reproducible while still exercising the experimental typed command model.

Possible Drawbacks or Risks

Compilation evaluates the trusted entrypoint with the compiler process Deno permissions. The entrypoint should therefore contain definitions rather than application startup side effects. The executable is Deno-first; Node-native CLI packaging is intentionally outside this layer.

Configliere is experimental and vendored. Updating it requires regenerating both the runtime bundle and declaration sidecar from a deliberately selected commit.

TODOs and Open Questions

None within this layer of the stack.

Learning

ES module namespaces can themselves become thenables when an entrypoint exports a callable named then; boxing the imported namespace avoids Promise assimilation while allowing the compiler to report a deliberate validation error.

Configliere positional parameters and named options propose claims against the same token stream. Its earliest-claim precedence allows --outdir build index.ts without letting the positional argument steal build from the option.

Screenshots

Not applicable; this change produces command-line artifacts.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Package Changes Through ddd6d0b

There are 1 changes which include @interactors/core with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@interactors/core 1.0.1 1.1.0
@interactors/keyboard 1.0.1 1.0.2
@interactors/html 1.0.1 1.0.2
@interactors/material-ui 5.0.0 5.0.1

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Deploy Preview Ready!

@cowboyd cowboyd changed the title codex/interactors compile Add the Interactor artifact compiler Sep 4, 2026
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.

1 participant