thurview 0.8.1 → 0.8.3
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 +7 -4
- package/dist/cli.js +72 -63
- package/dist/cli.js.map +1 -1
- package/dist/presence.js +34 -0
- package/dist/presence.js.map +1 -0
- package/dist/server/server.js +4 -0
- package/dist/server/server.js.map +1 -1
- package/dist/store.js +10 -0
- package/dist/store.js.map +1 -1
- package/dist/thread-state.js +17 -0
- package/dist/thread-state.js.map +1 -0
- package/dist/threads.js +10 -9
- package/dist/threads.js.map +1 -1
- package/dist/ui/app.css +18 -0
- package/dist/ui/app.js +82 -24
- package/dist/ui/app.js.map +4 -4
- package/package.json +1 -1
- package/skills/thurview/SKILL.md +12 -3
- package/skills/thurview/references/lifecycle.md +54 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thurview",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Guided, evidence-anchored reviews of agent-written code. A coding agent authors the review; you read, ask, comment and decide in the browser.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/skills/thurview/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: thurview
|
|
3
|
-
description: Author and publish a thurview document - a guided, evidence-anchored explanation the reader opens in the browser, annotates, asks questions about, and approves or sends back. Two kinds
|
|
3
|
+
description: Author and publish a thurview document - a guided, evidence-anchored explanation the reader opens in the browser, annotates, asks questions about, and approves or sends back. Two kinds — a review of a branch, pull request or commit range, and a code explainer of a whole codebase or one subsystem at a pinned commit. Use when the user asks to review a branch or PR, to explain or walk through a change, "review my branch against main", to explain how a codebase or subsystem works or where its design problems might be, or invokes /thurview. Not for a pass/fail bug hunt.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
argument-hint: "[<pr-number|pr-url> | --base <ref> --head <ref> | explain [<path>]]"
|
|
6
6
|
---
|
|
@@ -249,7 +249,9 @@ Tell the user, in a few lines and nothing more:
|
|
|
249
249
|
- which theme source you used: the user's request, the project's design
|
|
250
250
|
system (name the files), or the default skin
|
|
251
251
|
- when the review has no map, why not, in one clause
|
|
252
|
-
- that you are now waiting for their questions and their decision
|
|
252
|
+
- that you are now waiting for their questions and their decision, and that
|
|
253
|
+
a question asked after you stop waiting is queued rather than lost - the
|
|
254
|
+
page tells them which of the two it is
|
|
253
255
|
|
|
254
256
|
The page explains its own controls; do not describe them.
|
|
255
257
|
|
|
@@ -265,9 +267,16 @@ nothing: keep `--timeout` under that limit and run `wait` again on `timeout`.
|
|
|
265
267
|
When the tool can run a command in the background and wake you when it exits,
|
|
266
268
|
run `wait` that way, so the user has the terminal back while they read.
|
|
267
269
|
|
|
270
|
+
While `wait` runs the reader's page says an agent is listening, and says the
|
|
271
|
+
opposite within seconds of it returning. Do not loop it to look present: a
|
|
272
|
+
question asked with nobody waiting is queued, not lost, and `thurview`
|
|
273
|
+
reports it as `needsAgent` the next time you run any command in the
|
|
274
|
+
worktree.
|
|
275
|
+
|
|
268
276
|
`wait.reason` says what happened, with the threads that need you:
|
|
269
277
|
|
|
270
|
-
- `question`:
|
|
278
|
+
- `question`: a thread the reader sent to you. Answer each thread in
|
|
279
|
+
`threads` with
|
|
271
280
|
`thurview threads reply <threadId> --review <id> --body "<answer>"`. Do
|
|
272
281
|
not change the document for a question. Wait again.
|
|
273
282
|
- `awaiting-agent-updates`: the reader submitted with "Request changes".
|
|
@@ -27,7 +27,7 @@ warns when the branch moved past them.
|
|
|
27
27
|
| `accepted` | Terminal. Cannot be republished. |
|
|
28
28
|
| `closed` | Terminal. Ended without approval. Cannot be republished. |
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Asking the agent a question does not change the status. "Submit review" with "Request changes"
|
|
31
31
|
sets `awaiting-agent-updates`; with "Approve" sets `accepted`; with "Close"
|
|
32
32
|
sets `closed`.
|
|
33
33
|
|
|
@@ -36,21 +36,62 @@ Dismissal is separate: the reader removes the review from the active list and
|
|
|
36
36
|
|
|
37
37
|
## Threads
|
|
38
38
|
|
|
39
|
-
Two kinds, chosen by the reader when creating one
|
|
39
|
+
Two kinds, chosen by the reader when creating one. In the browser these are
|
|
40
|
+
the two buttons on the comment box, one click each:
|
|
40
41
|
|
|
41
|
-
- `ask` mode (a question):
|
|
42
|
-
Answer with `threads reply`.
|
|
43
|
-
|
|
44
|
-
- `review` mode (a comment): held as pending until the
|
|
45
|
-
`wait` returns `awaiting-agent-updates` with the
|
|
42
|
+
- `ask` mode (a question, "Send to the agent"): submitted on creation and
|
|
43
|
+
delivered at once. `wait` returns `question`. Answer with `threads reply`.
|
|
44
|
+
Open questions never block a republish.
|
|
45
|
+
- `review` mode (a comment, "Add to the review"): held as pending until the
|
|
46
|
+
reader submits. Then `wait` returns `awaiting-agent-updates` with the
|
|
47
|
+
submitted threads.
|
|
46
48
|
|
|
47
49
|
Targets: a document block (with an optional quoted selection), a file line
|
|
48
50
|
on the base or head side, a map node, or the whole review.
|
|
49
51
|
|
|
52
|
+
### Status, `submitted` and `needsAgent`
|
|
53
|
+
|
|
54
|
+
Two flags and one derived predicate decide whether a thread reaches you.
|
|
55
|
+
`needsAgent` is the whole queue: `wait` reports it, `threads list --open`
|
|
56
|
+
counts it, and a thread outside it will not be delivered to anyone.
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
needsAgent = status is open AND submitted AND the last message is the reader's
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
| Transition | status | submitted |
|
|
63
|
+
| ------------------------------ | -------------------- | ------------- |
|
|
64
|
+
| reader creates an `ask` thread | `open` | `true` |
|
|
65
|
+
| reader creates a `review` one | `open` | `false` |
|
|
66
|
+
| reader submits the review | unchanged | `true` (all) |
|
|
67
|
+
| **reader writes in a thread** | **forced to `open`** | `true` if ask |
|
|
68
|
+
| agent replies | unchanged | unchanged |
|
|
69
|
+
| `threads resolve` / Resolve | `resolved` | unchanged |
|
|
70
|
+
| Reopen | `open` | unchanged |
|
|
71
|
+
|
|
72
|
+
A message from the reader always reopens the thread. It has to: a reply that
|
|
73
|
+
left the thread resolved would sit at `needsAgent: false`, invisible to
|
|
74
|
+
`wait` and to `threads list --open`, and the reader would be writing to
|
|
75
|
+
nobody while the page still offered them a Reply button. Publishing a new
|
|
76
|
+
revision never touches a thread's status.
|
|
77
|
+
|
|
50
78
|
`publish` after the first revision requires zero open submitted comment
|
|
51
79
|
threads. Resolve a thread only when its requested change is present. Do not
|
|
52
80
|
rewrite or merge threads.
|
|
53
81
|
|
|
82
|
+
### Presence: what the reader is told
|
|
83
|
+
|
|
84
|
+
While `thurview wait` runs it writes a heartbeat to
|
|
85
|
+
`${THURVIEW_HOME:-~/.thurview}/agents/<reviewId>.json`, and the browser reads
|
|
86
|
+
it back as one of two sentences: an agent is listening now, or nothing is
|
|
87
|
+
listening and what you send is queued until one checks in. Nothing else
|
|
88
|
+
writes it, so presence is never inferred and never faked. A heartbeat older
|
|
89
|
+
than 15 seconds is a dead `wait`, not an agent.
|
|
90
|
+
|
|
91
|
+
That is why a question asked while you are away is not lost and does not need
|
|
92
|
+
you to sit in `wait`: it is queued, `thurview` reports it as `needsAgent` the
|
|
93
|
+
next time you run any command in the worktree, and you answer it then.
|
|
94
|
+
|
|
54
95
|
```sh
|
|
55
96
|
thurview threads list --review <id> [--open]
|
|
56
97
|
thurview threads get <threadId> --review <id>
|
|
@@ -64,6 +105,7 @@ thurview threads resolve <threadId> --review <id>
|
|
|
64
105
|
${THURVIEW_HOME:-~/.thurview}/
|
|
65
106
|
├── THURVIEW.md user guidance (optional)
|
|
66
107
|
├── server.json running server, if any
|
|
108
|
+
├── agents/<id>.json heartbeat of a running `wait`, removed when it ends
|
|
67
109
|
└── reviews/<id>/
|
|
68
110
|
├── review.md you edit
|
|
69
111
|
├── data.yaml you edit
|
|
@@ -90,3 +132,8 @@ again.
|
|
|
90
132
|
|
|
91
133
|
`thurview threads get <id>` truncates bodies over 1500 characters; pass
|
|
92
134
|
`--full` when the hint says so.
|
|
135
|
+
|
|
136
|
+
While `wait` runs, the reader's page says an agent is listening; when it
|
|
137
|
+
returns, the page says the opposite within seconds. Do not leave `wait`
|
|
138
|
+
running to look present when you are not going to answer, and do not loop it
|
|
139
|
+
to keep a queue drained: the queue survives you, and the reader is told so.
|