integrationPackage manifestv2.0.5

integration.harness-runtime

Runtime adapters for the ContractSpec harness system.

@lssm-tech/integration.harness-runtime
Source, release and verification context

Source snapshot bcc79fcc · Declared package version 2.0.5. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.

Package source ↗ Manifest ↗
servernode
EXPLORE THE PACKAGE

See where this package fits.

Follow a declared connection, inspect an import, then open the source guide when you need the detail.

THIS PACKAGEintegration.harness-runtimeintegrations

Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.

5 declarationsSELECT TO INSPECT

@lssm-tech/integration.harness-runtime

Website: https://contractspec.io

Runtime adapters that bridge the ContractSpec harness core into browser, sandbox, artifact, and MCP-backed execution targets.

What It Provides

  • Provides concrete adapters for deterministic Playwright browser automation, optional agent-browser visual computer-use runs, sandboxed execution, and artifact storage.
  • Exposes MCP helpers and default target resolution on top of the mode-agnostic harness core.
  • Keeps higher-cost runtime integrations optional so consumers can opt into heavier execution targets deliberately.
  • Enforces browser navigation and request-domain allowlists at runtime, emits sanitized network/trace and accessibility evidence, and keeps visual baseline updates manual and permit-bound.
  • Requires an injected container, process, or remote IsolatedCodeSandboxPort for code execution. Node vm is not represented as a security boundary; missing isolation fails closed.
  • src/adapters/ contains runtime, provider, or environment-specific adapters.
  • src/mcp/ contains MCP handlers, tools, prompts, and resources.

Playwright keyed reads

PlaywrightBrowserHarnessAdapter implements structured output for browser get actions that declare a non-empty key. It validates the complete keyed read set before creating a run session or navigating, then evaluates valid reads in authored order after the other actions complete.

Target Selector Result
text Required string | null from textContent
html Required string from innerHTML
value Required string from inputValue
title forbidden string from title()
url forbidden string from url()

Unkeyed reads remain legacy no-ops. Duplicate/empty keys, invalid selectors, and unavailable page methods fail the step without returning partial output; existing screenshot, DOM, and console capture remains unchanged.

Deterministic browser admission

The Playwright adapter checks all requested interactions and keyed-read methods before navigation. Missing methods fail instead of silently skipping a step; double-click and typing keep their exact semantics. Text waits require visible matching text. A requested viewport also requires runtime support.

Restricted targets require a fresh context with HTTP and WebSocket routing and service workers blocked. Page-only custom browser factories cannot claim this coverage. Setup failures close partially created pages and contexts. Host-level egress restrictions are still required: browser routing alone does not isolate DNS, redirect destinations or other network protocols.

Run bun run test:browser with the pinned Playwright peer and its Chromium binary installed. This opt-in real-browser suite exercises actual local HTTP, popup, WebSocket and service-worker behavior. Missing browser support fails the suite; skipped live tests in ordinary unit runs are not qualification evidence.

Low-level factory types are exported from ./adapters/playwright-types; ./adapters/playwright-actions exports exact action validation/execution helpers. Use the full adapter for session lifecycle, network guards and evidence capture. The helpers do not authorize actions or establish an isolated browser context.

Installation

npm install @lssm-tech/integration.harness-runtime

or

bun add @lssm-tech/integration.harness-runtime

Usage

Import the root entrypoint from @lssm-tech/integration.harness-runtime, or choose a documented subpath when you only need one part of the package surface.

Architecture

  • src/adapters/ contains Playwright, agent-browser, sandbox, and visual harness adapters.
  • src/artifacts/ contains filesystem and in-memory artifact-store implementations.
  • src/mcp/ exposes harness execution surfaces to MCP-aware runtimes.
  • src/targets/ contains target resolution helpers and target-selection logic.
  • src/types.ts exposes shared runtime-facing harness types.
  • src/index.ts is the root public barrel and package entrypoint.

Public Entry Points

  • Exports runtime adapters, artifact stores, MCP exposure helpers, target resolution, and shared types.
  • Export . resolves through ./src/index.ts.
  • Export ./adapters/agentBrowserHarnessAdapter resolves through ./src/adapters/agentBrowserHarnessAdapter.ts.
  • Export ./adapters/playwrightBrowserHarnessAdapter resolves through ./src/adapters/playwrightBrowserHarnessAdapter.ts.
  • Export ./adapters/sandboxedCodeExecutionAdapter resolves through ./src/adapters/sandboxedCodeExecutionAdapter.ts.
  • Export ./adapters/visualHarnessAdapter resolves through ./src/adapters/visualHarnessAdapter.ts.
  • Export ./artifacts/filesystemArtifactStore resolves through ./src/artifacts/filesystemArtifactStore.ts.
  • Export ./artifacts/inMemoryArtifactStore resolves through ./src/artifacts/inMemoryArtifactStore.ts.
  • Export ./mcp/exposure resolves through ./src/mcp/exposure.ts.
  • Export ./targets/defaultTargetResolver resolves through ./src/targets/defaultTargetResolver.ts.
  • Export ./types resolves through ./src/types.ts.

Local Commands

  • bun run dev — contractspec-bun-build dev
  • bun run build — contractspec-bun-build build
  • bun run test — bun test --pass-with-no-tests
  • bun run lint — bun run lint:fix
  • bun run lint:check — biome check .
  • bun run lint:fix — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
  • bun run typecheck — tsgo --noEmit
  • bun run publish:pkg — bun publish --tolerate-republish --ignore-scripts --verbose
  • bun run publish:pkg:canary — bun publish:pkg --tag canary
  • bun run clean — rimraf dist .turbo
  • bun run build:bundle — contractspec-bun-build transpile
  • bun run build:types — contractspec-bun-build types
  • bun run prebuild — contractspec-bun-build prebuild

Recent Updates

  • Replace eslint+prettier by biomejs to optimize speed.
  • Add a first-class harness system for controlled inspection, testing, evaluation, and proof generation.
  • Add OSS full-app verification adapters for Playwright and agent-browser, including auth profile refs, visual diff evidence, and replay-friendly browser artifacts.

Notes

  • Works alongside @lssm-tech/lib.contracts-spec, @lssm-tech/lib.harness, @lssm-tech/tool.bun, @lssm-tech/tool.typescript.
  • Authenticated browser runs should use named storage-state, browser-profile, session-name, or headers-env refs. Do not embed raw credentials, cookies, or bearer tokens in scenario specs or replay bundles.

Declared capabilities.

Integration Harness Runtime

Runtime adapters for the ContractSpec harness system.

Use it to

  • Adopt runtime adapters for the contractspec harness system

Requires

  • TypeScript

Choose another boundary when

  • The @lssm-tech/integration.harness-runtime package constraints do not match the target runtime or platform.

@lssm-tech/integration.harness-runtime

@lssm-tech/integration.harness-runtime/adapters/agentBrowserHarnessAdapter

@lssm-tech/integration.harness-runtime/adapters/playwrightBrowserHarnessAdapter

@lssm-tech/integration.harness-runtime/adapters/sandboxedCodeExecutionAdapter

@lssm-tech/integration.harness-runtime/adapters/visualHarnessAdapter

@lssm-tech/integration.harness-runtime/artifacts/filesystemArtifactStore

@lssm-tech/integration.harness-runtime/artifacts/inMemoryArtifactStore

@lssm-tech/integration.harness-runtime/integration

@lssm-tech/integration.harness-runtime/mcp/exposure

@lssm-tech/integration.harness-runtime/targets/defaultTargetResolver

@lssm-tech/integration.harness-runtime/types

Imports and export paths.

13 entries

These are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.

13 imports

Dependencies and related packages.

Runtime dependencies 5
Peer dependencies 1
playwright
^1.63.0
Development dependencies 4
playwright
catalog:testing
typescript
catalog:

Package scripts.

Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.

publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
publish:pkg:canarybun publish:pkg --tag canary
buildcontractspec-bun-build build
build:bundlecontractspec-bun-build transpile
build:typescontractspec-bun-build types
devcontractspec-bun-build dev
cleanrimraf dist .turbo
lintbun run lint:fix
lint:fixnode ../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../scripts/biome.cjs check --write .
lint:checknode ../../../scripts/biome.cjs check .
testbun test --pass-with-no-tests
test:browserHARNESS_BROWSER_LIVE_TESTS=1 bun test src/adapters/playwright-browser.live.test.ts
prebuildcontractspec-bun-build prebuild
typechecktsgo --noEmit
Your view

Make room for your context.

Shape the presentation around this moment. You can change it whenever you need.

Your context

The different parts of you

Choose a starting point

A useful mix of context, visuals and gentle guidance.

Tune each dimension
Each dimension can change independently. Product permissions and available actions stay unchanged.

Support the way you begin and return

Tune your support

Reading comfort

Choose your language

Interface language changes text only. Markets, prices and workflows keep their own settings.

Translation coverage

Original source

Navigation151
Graph616
Categories378
Portfolio833
Examples2,035
Source preview1,542

More translations will be added as content is reviewed.

This preference is saved on this browser.

Search the website

Useful starting points

No results. Try a shorter phrase, an operation name or another search area.

A LITTLE ROOM TO EXPLORE

Find something to explore.

Open a closer look on this page, try a different perspective, or follow the detail into its own page.

How previews and controls work
01

Look before you leave

Hover a link or focus it with Tab to see a preview. Clicking the original link or pressing Enter always opens its destination.

02

Stay with the context

Move into the preview to explore its sections. Use Alt + ↓ from a focused link to enter it with the keyboard. Escape closes it.

03

Open the possibilities

Disclosure rows, perspective choices and highlighted controls reveal more. Your view changes reading comfort and the context you explore.

A separate button for a closer look

Show small preview buttons beside links where there is room. Tap the eye to inspect, or tap the link to go straight there. This choice stays in this tab.

No browsing history is collected. Reduced motion follows your device and Your view.