Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
exit 1
fi
- run: bun pm pack --dry-run --ignore-scripts
- run: node --input-type=module -e 'await Promise.all(["./dist/index.js","./dist/core/index.js","./dist/react.js","./dist/testing/index.js","./dist/web.js"].map((path) => import(path)))'
- run: node --input-type=module -e 'await Promise.all(["./dist/index.js","./dist/core/index.js","./dist/react.js","./dist/testing/index.js","./dist/web.js","./dist/tooling/browser-verification-entry.js","./dist/tooling/bundle-boundary.js"].map((path) => import(path)))'

required:
name: Required
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
exit 1
fi
- run: bun pm pack --dry-run --ignore-scripts
- run: node --input-type=module -e 'await Promise.all(["./dist/index.js","./dist/core/index.js","./dist/react.js","./dist/testing/index.js","./dist/web.js"].map((path) => import(path)))'
- run: node --input-type=module -e 'await Promise.all(["./dist/index.js","./dist/core/index.js","./dist/react.js","./dist/testing/index.js","./dist/web.js","./dist/tooling/browser-verification-entry.js","./dist/tooling/bundle-boundary.js"].map((path) => import(path)))'

publish:
name: Publish
Expand Down
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- `src/testing/` – deterministic session, world-free manifest, evidence, activity, probe, and exact scripted-transport utilities.
- `src/react.ts` – opt-in React bindings for a Direct store.
- `src/web/` – atomic exact browser-session bridge installation plus low-level bridge and fail-closed application-fetch firewall.
- `src/tooling/` – opt-in Bun/Node browser-verification and emitted-bundle scanning mechanics kept outside browser/runtime graphs.
- `docs/` – architecture, adoption, verification, and wire-format reference.
- `examples/todos/` – runnable React example with separate production and Direct entries.
- `examples/react-native/` – runnable Expo example with platform-resolved native production and React Native Web Direct entries.
Expand All @@ -22,6 +23,7 @@
- Apply unreasonably robust programming when agent work is cheap. Prefer coherent cross-file correctness and focused deterministic evidence to a knowingly weaker design.
- Deliver changes to `main` through a current-head pull request. Keep the stable `Required` CI job green, resolve every review thread, and serialize merges. Human approval stays optional while one regular maintainer would otherwise self-review. Never force-push or bypass the gate.
- Keep core code product-, platform-, and framework-neutral. Put React, browser globals, and Node-only tooling behind explicit subpaths.
- Build `@hraness/direct/tooling/*` separately for Bun. Keep those host-only exports out of the default, core, React, testing, and web graphs, and prove the separation through the packed-consumer boundary gate.
- Keep React Native and Expo imports in the reference example; `@hraness/direct/react` remains the platform-neutral React binding.
- Keep `.js` extensions on relative TypeScript import and export specifiers; the published source type surface must compile under both Bundler and NodeNext resolution.
- Treat this repository as the complete project. Files and Git prose may use only its public names, paths, commands, and examples; do not refer to or infer any non-public source, system, product, package, path, or implementation detail.
Expand Down
27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ state with predictable local stand-ins. it does not click through the browser
or test the systems it replaces.

```sh
bun add --dev github:hraness/direct#v0.6.2
bun add --dev github:hraness/direct#v0.7.0
```

[overview](https://hraness.com/direct)
Expand All @@ -31,7 +31,7 @@ Copy this prompt into Codex, Claude Code, or another coding agent:

```text
Install hraness/direct and its bundled Agent Skills from
https://github.com/hraness/direct at the immutable v0.6.2 tag. Follow the
https://github.com/hraness/direct at the immutable v0.7.0 tag. Follow the
repository README, add `@hraness/direct` to devDependencies only, copy or link
`direct-setup` and `direct-verify` into this agent runner's configured
skills directory, and verify that the production dependency graph excludes
Expand All @@ -47,7 +47,7 @@ Pin the public repository to an immutable version tag:
```json
{
"devDependencies": {
"@hraness/direct": "github:hraness/direct#v0.6.2"
"@hraness/direct": "github:hraness/direct#v0.7.0"
}
}
```
Expand Down Expand Up @@ -132,7 +132,10 @@ Retain one catalog hash across the run. Direct does not need a driver-specific
plugin: agent-browser, Playwright MCP, and other tools can read the same page
contract.

Direct remains driver-neutral and provides no browser launcher. The canonical
Direct's browser runtime remains driver-neutral and never launches a process.
The opt-in host tooling can invoke a consumer-installed agent-browser CLI; the
product verifier still owns its commands, process lifetime, and evidence. The
canonical
[verification workflow](./docs/verification.md#run-one-bounded-local-chromium-batch)
uses one task-owned local Chromium session and process for a sequential batch
of at most eight scenarios. It opens a fresh BrowserContext with `window new`
Expand Down Expand Up @@ -180,6 +183,20 @@ A quiet probe means the declared deterministic work settled. It does not prove t
| `@hraness/direct/react` | Typed context, provider, and external-store hooks for React DOM or React Native | Optional React peer |
| `@hraness/direct/testing` | Sessions, manifest and probe parsers, evidence classification, activity scopes, and exact scripted transports | Development and verification |
| `@hraness/direct/web` | Atomic browser installation, with low-level bridge and firewall escape hatches | Browser only |
| `@hraness/direct/tooling/browser-verification` | Protocol-bound bridge reads, bounded agent-browser commands, local server leases, and artifact writes | Bun 1.3.14 with Node APIs |
| `@hraness/direct/tooling/bundle-boundary` | Deterministic emitted-file scans and exact versioned-wire evidence | Bun 1.3.14 with Node APIs |

The tooling subpaths are development-only. They are built separately from the
browser runtime and never enter the default, core, React, testing, or web
graphs. Tooling type checks require Bun and Node type definitions.

`readDirectBrowserContract` binds the exact package bridge schema and Direct's
manifest and probe parsers. Use `createDirectBrowserContractReader` when a
verifier supplies another compatible protocol. `createAgentBrowser` expects
agent-browser 0.32.3 at `node_modules/.bin/agent-browser` below the supplied
`repositoryRoot` and an empty task-owned config at
`scripts/direct/agent-browser.verify.json`. The product supplies its explicit
launch arguments, allowed domains, scenario commands, and final close policy.

## Activate scenarios

Expand Down Expand Up @@ -207,7 +224,7 @@ hybrid bridge shape.

## Repository scope

This repository contains the deterministic kernel, browser bridge, production-exclusion pattern, agent skills, a small React example, and an Expo/React Native reference app. It does not contain a browser launcher or driver, process coordinator, cleanup supervisor, browser-worker pool, or browser benchmark. Use the browser tooling that fits your product and require external evidence for browser or performance claims.
This repository contains the deterministic kernel, browser bridge, production-exclusion scanner, bounded host-verification helpers, agent skills, a small React example, and an Expo/React Native reference app. It does not bundle a browser driver or provide a process coordinator, cleanup supervisor, browser-worker pool, or browser benchmark. The optional helper invokes the consumer's local agent-browser installation; the product owns commands and evidence, and external proof remains required for browser or performance claims.

<!-- article:direct-a-harness-for-your-frontend:start -->
## [Direct gives browser agents deterministic app states](<https://hraness.com/direct>)
Expand Down
2 changes: 2 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading