@hraness/direct 0.7.6 → 0.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,25 +1,17 @@
1
- # direct
1
+ # Direct
2
2
 
3
3
  [![skills.sh](https://skills.sh/b/hraness/direct)](https://skills.sh/hraness/direct)
4
4
 
5
- a TypeScript harness for deterministic frontend development with repeatable
5
+ A TypeScript harness for deterministic frontend development with repeatable
6
6
  scenarios, local fixtures, and browser verification for coding agents.
7
+ Direct makes hard-to-reach frontend states addressable by URL. It runs your real
8
+ interface and feature code against named, validated local fixture worlds, so
9
+ signed-in, empty, and error states are repeatable without clicking through setup
10
+ or depending on live systems.
7
11
 
8
- name signed-in, empty, error, and other hard-to-reach app states once, then let
9
- coding agents open them by URL during development. your interface and feature
10
- code run normally. direct replaces only the outside systems needed for that
11
- state with predictable local fixtures. it does not click through the browser
12
- or test the systems it replaces.
13
-
14
- ```sh
15
- bun add --dev @hraness/direct@0.7.6
16
- # or
17
- npm install --save-dev @hraness/direct@0.7.6
18
- ```
19
-
20
- [npm](https://www.npmjs.com/package/@hraness/direct) ·
21
- [github](https://github.com/hraness/direct) ·
22
- [overview](https://hraness.com/direct)
12
+ [Install @hraness/direct from npm](https://www.npmjs.com/package/@hraness/direct) ·
13
+ [Direct source on GitHub](https://github.com/hraness/direct) ·
14
+ [Direct overview](https://hraness.com/direct)
23
15
 
24
16
  ```text
25
17
  real interface and feature state
@@ -30,16 +22,58 @@ real interface and feature state
30
22
  adapter harness
31
23
  ```
32
24
 
25
+ ## Why Direct
26
+
27
+ - **Keep product behavior real.** The interface and feature logic keep using a
28
+ product-owned port. Only the external adapters needed for the scenario are
29
+ replaced. Direct does not automate browser actions, and fixture evidence does
30
+ not prove those live systems.
31
+ - **Know when the page settled.** A versioned browser contract exposes the
32
+ active scenario, coverage catalog, and deterministic activity probe. A quiet
33
+ probe says declared work settled; product-owned assertions must still decide
34
+ whether the result is correct.
35
+
33
36
  ## Install
34
37
 
35
- ### Install the Agent Skill
38
+ Pin Direct as a development dependency:
39
+
40
+ ```sh
41
+ bun add --dev @hraness/direct@0.7.8
42
+ # or
43
+ npm install --save-dev @hraness/direct@0.7.8
44
+ ```
45
+
46
+ Keep Direct in `devDependencies`. A production entry must not import Direct,
47
+ its fixture worlds, or its workbench.
48
+
49
+ ## Open one deterministic state
50
+
51
+ The repository's Todo example runs the same React interface against a Direct
52
+ composition. It requires Git and Bun 1.3.14, then downloads the source and its
53
+ development dependencies:
54
+
55
+ ```sh
56
+ git clone --branch v0.7.8 --depth 1 https://github.com/hraness/direct.git
57
+ cd direct
58
+ bun install --frozen-lockfile --ignore-scripts
59
+ bun run example:direct
60
+ ```
61
+
62
+ Open
63
+ [`http://127.0.0.1:5173/direct/?__direct_scenario=todos.populated`](http://127.0.0.1:5173/direct/?__direct_scenario=todos.populated).
64
+ The page starts with the named populated world and stays available for browser
65
+ inspection. The example reserves that exact local address and exits instead of
66
+ silently choosing another port when it is occupied. Stop the development server
67
+ when the review is complete.
68
+
69
+ ## Install the Agent Skill
36
70
 
37
71
  Install Direct's single bundled skill from the public repository:
38
72
 
39
73
  ```sh
40
- npx skills add hraness/direct
74
+ npx skills add hraness/direct#v0.7.8
41
75
  # or
42
- bunx skills add hraness/direct
76
+ bunx skills add hraness/direct#v0.7.8
43
77
  ```
44
78
 
45
79
  The skill is invoked as `$direct`. It routes installation, adoption, and
@@ -53,7 +87,7 @@ Copy this prompt into Codex, Claude Code, or another coding agent:
53
87
 
54
88
  ```text
55
89
  Use $direct to install hraness/direct from
56
- the npm registry at the exact 0.7.6 version. Follow the repository README, add
90
+ the npm registry at the exact 0.7.8 version. Follow the repository README, add
57
91
  `@hraness/direct` to devDependencies only, and verify that the production
58
92
  dependency graph excludes Direct. Do not add a fixture composition until I
59
93
  ask.
@@ -69,7 +103,7 @@ Pin the public npm package to an exact immutable version:
69
103
  ```json
70
104
  {
71
105
  "devDependencies": {
72
- "@hraness/direct": "0.7.6"
106
+ "@hraness/direct": "0.7.8"
73
107
  }
74
108
  }
75
109
  ```
@@ -82,8 +116,6 @@ bun install
82
116
  npm install
83
117
  ```
84
118
 
85
- Keep Direct in `devDependencies`. A production entry must not import Direct, its fixture worlds, or its workbench.
86
-
87
119
  ## Agent skills
88
120
 
89
121
  Packages built from this source include one Agent Skill under
@@ -93,11 +125,11 @@ quiescence, coverage claims, cleanup, and emitted production boundaries. The
93
125
  package smoke test keeps that future packaged copy byte-identical to the
94
126
  repository skill.
95
127
 
96
- Prefer `npx skills add hraness/direct` or `bunx skills add hraness/direct` for
97
- runner discovery. You can also copy or link that one skill directory into a
98
- runner's configured location, then invoke `$direct`. Package installation
99
- leaves the skill inert: it does not run a `postinstall` hook or edit repository
100
- or user configuration.
128
+ Prefer `npx skills add hraness/direct#v0.7.8` or
129
+ `bunx skills add hraness/direct#v0.7.8` for runner discovery. You can also copy
130
+ or link that one skill directory into a runner's configured location, then
131
+ invoke `$direct`. Package installation leaves the skill inert: it does not run
132
+ a `postinstall` hook or edit repository or user configuration.
101
133
 
102
134
  ## A complete browser composition
103
135
 
@@ -191,7 +223,11 @@ and Chromium roots, or one containing job; the roots can occupy different
191
223
  process groups. Direct supplies neither that supervisor nor browser or
192
224
  performance evidence.
193
225
 
194
- See the [Todo example](https://github.com/hraness/direct/tree/main/examples/todos) for a strict parser, product-owned port, React workbench, and emitted-graph boundary verifier. The [React Native example](https://github.com/hraness/direct/tree/main/examples/react-native) uses the same session model in a platform-resolved Expo composition while keeping native production graphs Direct-free.
226
+ See the [Todo example](examples/todos) for a strict parser, product-owned port,
227
+ React workbench, and emitted-graph boundary verifier. The
228
+ [React Native example](examples/react-native) uses the same session model in a
229
+ platform-resolved Expo composition while keeping native production graphs
230
+ Direct-free.
195
231
 
196
232
  ## Keep evidence honest
197
233
 
@@ -218,7 +254,7 @@ A quiet probe means the declared deterministic work settled. It does not prove t
218
254
  | `@hraness/direct/web` | Atomic browser installation, with low-level bridge and firewall escape hatches | Browser only |
219
255
  | `@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 |
220
256
  | `@hraness/direct/tooling/bombadil-campaign` | Direct property and conservative action factories for a Bombadil specification | Bombadil 0.7.2 specification compiler |
221
- | `@hraness/direct/tooling/bombadil` | Local server ownership, native Bombadil lifecycle, trace attestation, replay, and diagnostic artifacts | Bun 1.3.14 with Node APIs |
257
+ | `@hraness/direct/tooling/bombadil` | Local server ownership, native Bombadil lifecycle, serial campaign matrices, trace attestation and summaries, replay, and diagnostic artifacts | Bun 1.3.14 with Node APIs |
222
258
  | `@hraness/direct/tooling/bundle-boundary` | Deterministic emitted-file scans and exact versioned-wire evidence | Bun 1.3.14 with Node APIs |
223
259
 
224
260
  The tooling subpaths are development-only. They are built separately from the
@@ -264,6 +300,7 @@ export * from "@antithesishq/bombadil/browser/defaults/properties";
264
300
 
265
301
  const direct = createDirectBombadilProperties();
266
302
  export const direct_safe_actions = createDirectBombadilActions();
303
+ export const direct_startup_contract = direct.startupContract;
267
304
  export const direct_exact_contract = direct.exactContract;
268
305
  export const direct_stable_catalog = direct.stableCatalog;
269
306
  export const direct_no_declared_violations = direct.noDeclaredViolations;
@@ -275,7 +312,34 @@ path, and any additional safe actions. Call `runDirectBombadilFuzz` from
275
312
  `@hraness/direct/tooling/bombadil` in a small Bun wrapper. The runner accepts
276
313
  only an explicit local HTTP origin, starts an argv-only server command, invokes
277
314
  the exact native 0.7.2 binary, attests the bounded trace with Direct's canonical
278
- parsers, writes pass or failure artifacts, and releases its owned processes.
315
+ parsers, writes pass or failure artifacts plus a compact exploration summary,
316
+ and releases its owned processes. Use `runDirectBombadilFuzzMatrix` when a
317
+ product owns several scenarios; it runs them serially and requires one exact
318
+ campaign selector for replay.
319
+
320
+ Startup is the only repairable contract phase. It must reach one exact Direct
321
+ observation within ten seconds. From that sample onward, activation identity,
322
+ route, scenario, catalog, and zero declared violations are immediate safety
323
+ invariants; only quiescence remains bounded liveness.
324
+
325
+ Keep liveness formulas time-bounded. Prefer guarded product actions with
326
+ explicit weights over unrestricted browser actions, and name small JSON
327
+ snapshots that expose semantic state without retaining page content. Run short
328
+ 12–30 second campaigns while editing and longer 60–300 second matrices in a
329
+ scheduled diagnostic lane. Inspect and replay a retained failing trace, then
330
+ promote the smallest readable failure to a deterministic product regression.
331
+ When a campaign must exercise an interaction, require a named product value to
332
+ change after the intended action kind, as well as after a non-Wait action, so
333
+ bootstrap, idle, prerequisite, and unrelated transitions do not satisfy the
334
+ exploration policy. Attribution requires adjacent exact Direct observations;
335
+ it is temporal response evidence rather than proof of causality.
336
+ If the full product snapshot includes viewport dimensions, put that requirement
337
+ on a separate interaction snapshot without viewport fields and require an
338
+ opposite-size `SetViewport` independently. Latch the first ready product state
339
+ for initial-world properties so later actions cannot repair a bad initial state.
340
+ The raw trace remains authoritative and may contain screenshots, URLs, typed
341
+ text, accessible labels, and local paths; treat it as potentially sensitive.
342
+ Summary counts and hashes help triage exploration but are not Direct coverage.
279
343
  See [Verification](./docs/verification.md#run-a-bounded-bombadil-campaign) for
280
344
  the complete configuration and proof limits.
281
345
 
@@ -342,7 +406,9 @@ agent-browser or Playwright
342
406
 
343
407
  A Direct world is validated JSON that describes one starting state. A scenario gives that world a name and route. It does not contain browser actions. The browser check still decides what to click and what outcome to assert.
344
408
 
345
- The [public Todo example](<https://github.com/hraness/direct/tree/main/examples/todos>) uses one `TodoPort` in both compositions. The component receives whichever implementation the entry point owns:
409
+ The [public Todo example](examples/todos) uses one `TodoPort` in both
410
+ compositions. The component receives whichever implementation the entry point
411
+ owns:
346
412
 
347
413
  **One product port, two compositions**
348
414