thurview 0.1.4
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/LICENSE +21 -0
- package/README.md +185 -0
- package/bin/thurview.js +8 -0
- package/dist/cli.js +1101 -0
- package/dist/cli.js.map +1 -0
- package/dist/diff.js +65 -0
- package/dist/diff.js.map +1 -0
- package/dist/document/compile.js +418 -0
- package/dist/document/compile.js.map +1 -0
- package/dist/document/parse.js +139 -0
- package/dist/document/parse.js.map +1 -0
- package/dist/document/schema.js +129 -0
- package/dist/document/schema.js.map +1 -0
- package/dist/flags.js +66 -0
- package/dist/flags.js.map +1 -0
- package/dist/git.js +206 -0
- package/dist/git.js.map +1 -0
- package/dist/highlight-theme.js +93 -0
- package/dist/highlight-theme.js.map +1 -0
- package/dist/highlight.js +163 -0
- package/dist/highlight.js.map +1 -0
- package/dist/main.js +3 -0
- package/dist/main.js.map +1 -0
- package/dist/server/server.js +387 -0
- package/dist/server/server.js.map +1 -0
- package/dist/store.js +100 -0
- package/dist/store.js.map +1 -0
- package/dist/symbols.js +192 -0
- package/dist/symbols.js.map +1 -0
- package/dist/theme.js +301 -0
- package/dist/theme.js.map +1 -0
- package/dist/threads.js +87 -0
- package/dist/threads.js.map +1 -0
- package/dist/ui/app.css +1415 -0
- package/dist/ui/app.js +2303 -0
- package/dist/ui/app.js.map +7 -0
- package/dist/ui/assets/fonts/inter-400.woff2 +0 -0
- package/dist/ui/assets/fonts/jetbrains-mono-400.woff2 +0 -0
- package/dist/ui/assets/fonts/press-start-2p-400.woff2 +0 -0
- package/dist/ui/assets/inter-400.woff2 +0 -0
- package/dist/ui/assets/jetbrains-mono-400.woff2 +0 -0
- package/dist/ui/assets/press-start-2p-400.woff2 +0 -0
- package/dist/ui/index.html +13 -0
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/package.json +70 -0
- package/skills/thurview/SKILL.md +219 -0
- package/skills/thurview/references/components.md +120 -0
- package/skills/thurview/references/document-authoring.md +107 -0
- package/skills/thurview/references/lifecycle.md +88 -0
- package/skills/thurview/references/software-map.md +42 -0
- package/skills/thurview/references/theme.md +90 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 LeTuR
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# thurview
|
|
2
|
+
|
|
3
|
+
Guided, evidence-anchored reviews of agent-written code.
|
|
4
|
+
|
|
5
|
+
A coding agent studies a branch, pull request or commit range and writes a
|
|
6
|
+
short document in which every claim is anchored to an exact file and line
|
|
7
|
+
range at a pinned commit. thurview validates the anchors, seals a revision,
|
|
8
|
+
and serves it in your browser: the walkthrough, live code peeks, the diff,
|
|
9
|
+
commits, and a software map. You ask questions, leave anchored comments, and
|
|
10
|
+
approve or request changes. The agent answers and republishes.
|
|
11
|
+
|
|
12
|
+
It does not review the code for you. It helps you understand it fast enough
|
|
13
|
+
to review it yourself.
|
|
14
|
+
|
|
15
|
+

|
|
17
|
+
|
|
18
|
+
The clip is the `/thurview` skill's loop end to end: `thurview publish`, a
|
|
19
|
+
question arriving in `thurview wait`, the reply, then the reader following an
|
|
20
|
+
anchor into the code, commenting on a line range in the diff, reading the
|
|
21
|
+
answer in the threads panel and requesting changes.
|
|
22
|
+
|
|
23
|
+
## What the reader sees
|
|
24
|
+
|
|
25
|
+
Prose with every claim anchored to code, opened beside the text:
|
|
26
|
+
|
|
27
|
+

|
|
29
|
+
|
|
30
|
+
The diff at the pinned commits, commenting on a selected line range:
|
|
31
|
+
|
|
32
|
+

|
|
34
|
+
|
|
35
|
+
The software map, showing what the change added and what it touched:
|
|
36
|
+
|
|
37
|
+

|
|
39
|
+
|
|
40
|
+
Threads: a question the agent already answered, and a comment held for the
|
|
41
|
+
decision:
|
|
42
|
+
|
|
43
|
+

|
|
45
|
+
|
|
46
|
+
Approve, or send it back with the comments:
|
|
47
|
+
|
|
48
|
+

|
|
50
|
+
|
|
51
|
+
```mermaid
|
|
52
|
+
flowchart LR
|
|
53
|
+
A[Branch, PR or range] --> B[Agent pins base and head]
|
|
54
|
+
B --> C[Agent authors review.md + data.yaml + map.yaml]
|
|
55
|
+
C --> D[thurview publish: validate, seal revision]
|
|
56
|
+
D --> E[You read, ask, comment in the browser]
|
|
57
|
+
E -->|Request changes| C
|
|
58
|
+
E -->|Approve| F[Done]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Install
|
|
62
|
+
|
|
63
|
+
Give your agent the skill, with the [skills](https://github.com/vercel-labs/skills)
|
|
64
|
+
CLI. It works with Claude Code, Codex, Cursor, OpenCode and every agent that
|
|
65
|
+
reads the Agent Skills format:
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
npx skills add Thurbeen/thurview --skill thurview
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The skill drives the `thurview` command, which needs Node 22 or later and
|
|
72
|
+
git (`gh` for pull requests). Install it, or let the skill reach it through
|
|
73
|
+
`npx`:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
npm install -g thurview # or: pnpm add -g thurview
|
|
77
|
+
npx -y thurview # no install; the skill falls back to this
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
To run from a checkout instead:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
pnpm install
|
|
84
|
+
pnpm build
|
|
85
|
+
npm link # puts `thurview` on PATH
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Optional, for ambient context: `thurview setup hooks` installs a
|
|
89
|
+
SessionStart hook for Claude Code, Codex and OpenCode, so every session opens
|
|
90
|
+
with the reviews of its working directory. `thurview setup skill` links the
|
|
91
|
+
skill from this checkout instead of the `skills` CLI copy; use one or the
|
|
92
|
+
other.
|
|
93
|
+
|
|
94
|
+
Then, in any repository, ask your agent:
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
Use the thurview skill to review my current branch against up-to-date main
|
|
98
|
+
and open it.
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## What the reader gets
|
|
102
|
+
|
|
103
|
+
- **Review**: the document with a table of contents. Anchor links open the
|
|
104
|
+
exact code beside the text; peeks show it inline. Sequence diagrams, call
|
|
105
|
+
stack diffs and storage views are clickable down to the line.
|
|
106
|
+
- **Files**: split or unified diff of every changed file at the pinned
|
|
107
|
+
commits, with expandable context. Click a line number to comment on it.
|
|
108
|
+
Click an identifier to see where it is defined at that commit; Ctrl-click
|
|
109
|
+
jumps there.
|
|
110
|
+
- **Commits**: the commits between base and head.
|
|
111
|
+
- **Map**: systems, containers, components and code, with what the change
|
|
112
|
+
added, removed or touched, linked to files and code.
|
|
113
|
+
- **Threads**: _Ask now_ sends a question to the agent immediately and the
|
|
114
|
+
answer lands in the same thread. _Add to review_ holds a comment until you
|
|
115
|
+
submit with _Approve_ or _Request changes_.
|
|
116
|
+
- **Revisions**: every publish is sealed; switch back to earlier ones.
|
|
117
|
+
- **Theme**: the agent reads the project's design tokens and fonts and
|
|
118
|
+
publishes them with the review, so each review looks like the code it
|
|
119
|
+
explains. The default skin applies when the project has none.
|
|
120
|
+
|
|
121
|
+
Everything runs locally against your checkout. The server listens on
|
|
122
|
+
loopback and, when present, your Tailscale address, so a phone or another
|
|
123
|
+
machine on the tailnet can open the same URL.
|
|
124
|
+
|
|
125
|
+
## CLI
|
|
126
|
+
|
|
127
|
+
| Command | Purpose |
|
|
128
|
+
| -------------------------------------------------- | ------------------------------------------------------------ |
|
|
129
|
+
| `thurview scaffold [--pr N \| --base R --head R]` | Create a review pinned to exact commits (`--update` re-pins) |
|
|
130
|
+
| `thurview info [--all]` | Reviews bound to this worktree |
|
|
131
|
+
| `thurview publish --review ID [--view T] [--open]` | Validate the document and map, seal a revision |
|
|
132
|
+
| `thurview open --review ID [--view T]` | Start the server if needed and open the browser |
|
|
133
|
+
| `thurview wait --review ID [--timeout S]` | Block until the reader needs the agent |
|
|
134
|
+
| `thurview threads list\|get\|reply\|resolve` | Read and answer threads |
|
|
135
|
+
| `thurview serve` / `thurview stop` | Run the server in the foreground / stop the background one |
|
|
136
|
+
| `thurview setup hooks\|skill\|status` | Session hooks, agent skill, install state |
|
|
137
|
+
| `thurview update` | Self-update from npm |
|
|
138
|
+
|
|
139
|
+
thurview is an [AXI](https://axi.md): built for agents that drive it through a
|
|
140
|
+
shell. Output is [TOON](https://toonformat.dev) on stdout, errors are
|
|
141
|
+
structured on stdout with an actionable `help`, exit code 2 marks a usage error
|
|
142
|
+
(an unknown flag fails loudly and lists the valid ones), lists carry counts and
|
|
143
|
+
definitive empty states, long bodies are truncated with a `--full` escape
|
|
144
|
+
hatch, every result ends with `help[]` next steps, and `thurview` with no
|
|
145
|
+
arguments shows live state for the current directory instead of a manual.
|
|
146
|
+
`thurview <command> --help` is the fallback. Progress and diagnostics go to
|
|
147
|
+
stderr.
|
|
148
|
+
|
|
149
|
+
## Authoring format
|
|
150
|
+
|
|
151
|
+
The agent writes three files in `~/.thurview/reviews/<id>/`:
|
|
152
|
+
|
|
153
|
+
- `review.md`: Markdown. `[text](anchor:id)` links prose to code. Fenced
|
|
154
|
+
blocks `peek`, `sequence`, `callstack` and `database` add components.
|
|
155
|
+
`## Heading {collapsed}` folds a section by default.
|
|
156
|
+
- `data.yaml`: typed inputs: `actors`, `anchors` (file, from, to, graph),
|
|
157
|
+
`stores`.
|
|
158
|
+
- `map.yaml`: the software map at head, optionally at base.
|
|
159
|
+
- `theme.yaml`: the look, derived from the reviewed project's own design
|
|
160
|
+
system (tokens, fonts, shape, code palette). Empty means the default skin.
|
|
161
|
+
|
|
162
|
+
`thurview publish` rejects an anchor whose file or lines do not exist at the
|
|
163
|
+
pinned commit, a call stack frame that claims an added or removed call the
|
|
164
|
+
diff does not show, a storage operation on an unknown field, and a map edge
|
|
165
|
+
to an unknown node. The full format is in
|
|
166
|
+
[skills/thurview/references](skills/thurview/references).
|
|
167
|
+
|
|
168
|
+
Optional guidance for the agent: `~/.thurview/THURVIEW.md` for you,
|
|
169
|
+
`THURVIEW.md` at a repository root for that repository.
|
|
170
|
+
|
|
171
|
+
## Development
|
|
172
|
+
|
|
173
|
+
```sh
|
|
174
|
+
pnpm check # type-check server and UI, run the end-to-end tests
|
|
175
|
+
pnpm build
|
|
176
|
+
pnpm dev -- scaffold
|
|
177
|
+
node scripts/browser-check.mjs <url> [seconds] [shot.png] # console errors + screenshot of a view
|
|
178
|
+
scripts/demo/record.sh # re-record media/thurview-demo.{mp4,gif}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Set `THURVIEW_HOME` to keep state elsewhere than `~/.thurview`.
|
|
182
|
+
|
|
183
|
+
## License
|
|
184
|
+
|
|
185
|
+
MIT
|
package/bin/thurview.js
ADDED