@agent-inspect/harness 3.5.0 → 3.5.2

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.
Files changed (2) hide show
  1. package/README.md +76 -0
  2. package/package.json +4 -3
package/README.md ADDED
@@ -0,0 +1,76 @@
1
+ # @agent-inspect/harness
2
+
3
+ Fixture runner for tracing real projects locally (bootstrap → invoke → shutdown).
4
+
5
+ ## When to use
6
+
7
+ - You have a real app (NestJS, Express, etc.) and want deterministic fixture runs
8
+ - CI or local recipes with stdin JSON fixtures
9
+
10
+ ## When not to use
11
+
12
+ - Simple scripts (use `observe` or `inspectRun`)
13
+ - Hosted test runners
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ npm install agent-inspect @agent-inspect/harness
19
+ ```
20
+
21
+ ## Example
22
+
23
+ ```ts
24
+ import { createFixtureRunner, defineTarget } from "@agent-inspect/harness";
25
+
26
+ const runner = createFixtureRunner({
27
+ name: "my-app",
28
+ bootstrap: async () => app,
29
+ shutdown: async (app) => app.close(),
30
+ });
31
+
32
+ runner.register(
33
+ defineTarget({
34
+ name: "chat",
35
+ resolve: (app) => app.get(ChatService),
36
+ invoke: async (target, input) => target.run(input),
37
+ }),
38
+ );
39
+
40
+ await runner.runTarget("chat", { fixturePath: "fixtures/hello.json" });
41
+ ```
42
+
43
+ ## Privacy
44
+
45
+ - Traces written locally via `agent-inspect`
46
+ - No upload
47
+
48
+ ## API
49
+
50
+ | Export | Purpose |
51
+ | ------ | ------- |
52
+ | `createFixtureRunner` | Runner with bootstrap/shutdown |
53
+ | `defineTarget` | Register callable targets |
54
+ | CLI via `agent-inspect harness` | Run fixtures from shell |
55
+
56
+ ## CLI
57
+
58
+ `npx agent-inspect harness run` · `list-targets`
59
+
60
+ ## Docs
61
+
62
+ - [NestJS harness starter](https://github.com/rajudandigam/agent-inspect/tree/main/examples/starters/harness-nestjs)
63
+ - [NESTJS.md](https://github.com/rajudandigam/agent-inspect/blob/main/docs/NESTJS.md)
64
+
65
+ ## Troubleshooting
66
+
67
+ - **bootstrap_failed:** Check app module imports and env vars (use fixtures, not prod secrets)
68
+ - **fixture_read_failed:** Validate JSON fixture path
69
+
70
+ ## Version
71
+
72
+ `agent-inspect@3.5.x`
73
+
74
+ ## License
75
+
76
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-inspect/harness",
3
- "version": "3.5.0",
3
+ "version": "3.5.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Local fixture runner for AgentInspect traces in real project integrations",
@@ -12,7 +12,7 @@
12
12
  "bugs": {
13
13
  "url": "https://github.com/rajudandigam/agent-inspect/issues"
14
14
  },
15
- "homepage": "https://github.com/rajudandigam/agent-inspect#readme",
15
+ "homepage": "https://github.com/rajudandigam/agent-inspect/tree/main/packages/harness",
16
16
  "sideEffects": false,
17
17
  "main": "./dist/index.cjs",
18
18
  "module": "./dist/index.mjs",
@@ -30,10 +30,11 @@
30
30
  }
31
31
  },
32
32
  "files": [
33
+ "README.md",
33
34
  "dist"
34
35
  ],
35
36
  "dependencies": {
36
- "agent-inspect": "3.5.0"
37
+ "agent-inspect": "3.5.2"
37
38
  },
38
39
  "publishConfig": {
39
40
  "access": "public"