You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit abe97f6
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(inspector)!: drop the predefined agent tools; harnesses define their own (#5570)
* refactor(inspector)!: drop the predefined agent tools; harnesses define their own
* chore(ci): agree to the inspector's agent-tool file deletions
* docs(inspector): describe the HTTP contract only, export the request types
* fix(inspector): ship the HTTP server and give every refusal a stable code
* fix(inspector): keep the server export in the subpath descriptor
* fix(inspector): keep the HTTP server reusable after a large body
* fix(inspector): start the npm bin when it is a symlink
* fix(inspector): import the server test without a .ts extension
* fix(inspector): ship the HTTP server without a second copy of the service
Copy file name to clipboardExpand all lines: packages/inspector/README.md
+22-8Lines changed: 22 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Recover original HTML/CSS/GSAP context for **known elements before an edit**. This is not a video check, screenshot, diff, or affected-component verifier. It combines the I002 runtime/compiler provenance approach with the I003 HF-owned service boundary. The agent adapter holds no DOM or animation state.
4
4
5
-
This source-only experimental package is private. It does not modify the shared installation or register itself in a harness. Base: HF 0.8.127, commit `b3d2b82fe`.
5
+
Published as `@hyperframes/inspector`. It does not modify the shared installation or register itself in a harness.
bun packages/inspector/src/server.ts /absolute/video/project
18
18
```
19
19
20
-
The service prints its loopback URL. Starting it does **not** start a browser. First inspection loads the project once. Configure the harness's MCP server to execute:
20
+
The service prints its loopback URL. Starting it does **not** start a browser. First inspection loads the project once.
21
21
22
-
```sh
23
-
HF_INSPECT_URL=http://127.0.0.1:PRINTED_PORT bun packages/inspector/src/mcp.ts
24
-
```
25
-
26
-
Tool: `inspect_components`. Direct HTTP equivalent: `POST /inspect` with the same JSON. The service is bound to one project at startup, so no per-call project path is needed. `GET /info` returns project identity and startup/query counters. Stop with SIGINT/SIGTERM; the service disposes its own pages/browser.
22
+
The package ships the capability, not agent tools: a harness defines its own tool names, descriptions and schemas, and calls `POST /inspect` with the JSON below. The service is bound to one project at startup, so no per-call project path is needed. `GET /info` returns project identity and startup/query counters. Stop with SIGINT/SIGTERM; the service disposes its own pages/browser.
27
23
28
24
## Input
29
25
@@ -83,7 +79,25 @@ Code blocks are atomic. `omitted`, `omittedCount`, and `nextOffset` describe mis
83
79
84
80
`maxBytes` can be raised explicitly (2,048–256,000). A block larger than the budget is not cut in half: request that ID with a larger budget or read its file/range. Pagination can therefore remain at the same offset until the budget increases. Old-generation continuations are rejected.
85
81
86
-
Full runtime evidence is only available by an explicit HTTP request with `debug: true`; it is deliberately not part of the agent tool schema or its default output budget.
82
+
Full runtime evidence is only available by an explicit HTTP request with `debug: true`; it is deliberately not part of the default request or its output budget.
83
+
84
+
## Timeline
85
+
86
+
`POST /timeline` answers which animations are scheduled when, from the same browser, page and generation as `/inspect`. It never seeks, renders or edits files.
`component` is optional and resolves like an `/inspect` target; omit it for every registered HF timeline. Give at most one of `at`, `range: [start, end]` or `boundary`, in global seconds; omit all three for the schedule overview. Results are short text grouped by component, with event times, targets, properties and source locations; `generation` and `offset` page through them. Coverage is registered DOM-target GSAP animations and explicit HF items only; anything outside that, or past the expansion limits, is reported as incomplete coverage rather than guessed.
93
+
94
+
## Element map
95
+
96
+
`POST /element-map` returns the composition's element map from the same page. It reads no query fields. A project with no `index.html` answers `404``{ "error": "no-composition", "code": "no-composition" }`.
97
+
98
+
## Errors
99
+
100
+
Every refusal is JSON `{ "error", "code" }`. `code` is the stable token (`no-composition`, `stale_generation`, `source_changed_during_query`, `request_too_large`); a sentence with no token is `invalid_request`. A missing browser is `503``browser_unavailable`, and an unexpected failure is `500``internal_error`. Importing the module does not listen; `createInspectorServer(project)` builds one. An unknown route is `404``{ "error": "not_found", "code": "not_found" }`. `GET /info` adds `version`, this package's version. The process listens on `127.0.0.1` and refuses a `Host` that is not loopback, so a rebinding request cannot read the project path. Install the server with the package: `hyperframes-inspector <project> [port]`, or `node dist/server.js`.
0 commit comments