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 declaracionesSELECT 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 Resultado
text Obligatorio string | null from textContent
html Obligatorio string from innerHTML
value Obligatorio 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.

Arquitectura

  • 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 importaciones

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
Tu vista

Make room for your context.

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

Tu contexto

The different parts of you

Choose a starting point

Una mezcla útil de contexto, imágenes y orientación discreta.

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

Comodidad de lectura

Elige tu idioma

El idioma de la interfaz solo cambia el texto. Los mercados, precios y flujos de trabajo conservan sus propios ajustes.

Cobertura de traducción

Parte del contenido se muestra en inglés.

Navegación151
Grafo616
Categorías188
Portafolio332
Ejemplos2035
Vista previa de la fuente41

Se añadirán más traducciones a medida que se revise el contenido.

Esta preferencia se guarda en este navegador.

Buscar en el sitio web

Puntos de partida útiles

Sin resultados. Prueba una frase más corta, un nombre de operación u otro ámbito de búsqueda.

UN POCO DE ESPACIO PARA EXPLORAR

Encuentra algo que explorar.

Abre una vista detallada en esta página, prueba otra perspectiva o sigue el detalle a su propia página.

Cómo funcionan las vistas previas y los controles
01

Mirar antes de salir

Pasa el cursor por un enlace o enfócalo con Tab para ver una vista previa. Hacer clic en el enlace original o pulsar Intro siempre abre su destino.

02

Mantener el contexto

Entra en la vista previa para explorar sus secciones. Usa Alt + ↓ desde un enlace enfocado para entrar con el teclado. Escape la cierra.

03

Abrir las posibilidades

Las filas desplegables, las perspectivas y los controles destacados revelan más. Tu vista cambia la comodidad de lectura y el contexto que exploras.

Un botón separado para mirar más de cerca

Muestra pequeños botones de vista previa junto a los enlaces donde haya espacio. Toca el ojo para inspeccionar o el enlace para ir directamente. Esta elección permanece en esta pestaña.

No se recoge historial de navegación. El movimiento reducido sigue tu dispositivo y Tu vista.