pipeup 0.9.0 → 1.0.0
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 +3 -3
- package/cli/browser-host.mjs +43 -0
- package/cli/browser.mjs +144 -0
- package/cli/check.mjs +14 -1
- package/cli/pipeup.mjs +54 -2
- package/cli/read.mjs +1 -1
- package/dist/addons.json +12 -12
- package/dist/pipeup.agents.js +1 -1
- package/dist/pipeup.core.js +1 -1
- package/dist/pipeup.esm.js +1 -1
- package/dist/pipeup.min.js +1 -1
- package/dist/types/anchor/clues.d.ts +16 -0
- package/dist/types/anchor/resolve.d.ts +2 -0
- package/dist/types/core.d.ts +2 -2
- package/dist/types/document.d.ts +6 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/model/ops.d.ts +3 -0
- package/dist/types/model/types.d.ts +22 -2
- package/dist/types/ui/addons.d.ts +13 -0
- package/dist/types/ui/app.d.ts +21 -0
- package/dist/types/ui/column.d.ts +2 -0
- package/dist/types/ui/context.d.ts +11 -0
- package/dist/types/ui/field.d.ts +22 -0
- package/dist/types/ui/host.d.ts +1 -1
- package/dist/types/ui/mount.d.ts +42 -0
- package/dist/types/ui/styles.d.ts +1 -1
- package/dist/types/ui/thread-view.d.ts +4 -0
- package/package.json +3 -2
- package/skills/pipeup-add/SKILL.md +2 -2
- package/skills/pipeup-apply/SKILL.md +14 -9
- package/skills/pipeup-integrate/SKILL.md +40 -8
- package/skills/pipeup-send-to-git-setup/SKILL.md +1 -1
- package/skills/pipeup-summarise/SKILL.md +1 -1
|
@@ -5,16 +5,21 @@ description: Use when someone asks you to act on Pipeup feedback for an HTML pag
|
|
|
5
5
|
|
|
6
6
|
# Apply Pipeup feedback
|
|
7
7
|
|
|
8
|
-
Written for Pipeup 0.
|
|
8
|
+
Written for Pipeup 1.0.0 This skill is published at https://pipeup-ai.github.io/pipeup/skills/pipeup-apply/SKILL.md. Its companions: [integrate](https://pipeup-ai.github.io/pipeup/skills/pipeup-integrate/SKILL.md), [summarise](https://pipeup-ai.github.io/pipeup/skills/pipeup-summarise/SKILL.md).
|
|
9
9
|
|
|
10
10
|
## 1. Read the comments
|
|
11
11
|
|
|
12
12
|
Use the first of these that works:
|
|
13
13
|
|
|
14
|
-
0. **A live link** (the author runs `npx --yes pipeup@
|
|
15
|
-
prints, and switches on **Share with my agent**): run `npx --yes pipeup@
|
|
14
|
+
0. **A live link** (the author runs `npx --yes pipeup@1 watch report.html --agent Claude` on this computer, opens the page it
|
|
15
|
+
prints, and switches on **Share with my agent**): run `npx --yes pipeup@1 comments report.html` (add `--all` for resolved
|
|
16
16
|
threads, `--json` for data). No browser needed. If it says nothing is shared, ask the author to switch the switch on.
|
|
17
17
|
Your replies below reach the open page within seconds. The link lists your key for the page while it runs.
|
|
18
|
+
**Sent from the browser extension** (the reviewer pressed **Send to my agent** in Pipeup's menu, on any website):
|
|
19
|
+
run `npx --yes pipeup@1 browser` to list the pages sent, newest first, and `npx --yes pipeup@1 browser read <page>`
|
|
20
|
+
for one page's comments (`<page>` is part of its address or title). Answer each thread with
|
|
21
|
+
`npx --yes pipeup@1 browser reply <page> --thread <id> --agent <your name> "<words>"`; the extension puts the reply
|
|
22
|
+
in the thread when the page is next open. There's no page file to edit: tell the author what to change on the site.
|
|
18
23
|
1. **Run the page** in a browser (you can drive one, or the author has it open) and evaluate
|
|
19
24
|
`await Pipeup.comments()`. It returns `{ markdown, threads }`: `markdown` is the same text as **Copy as
|
|
20
25
|
Markdown**, and `threads` is the same threads as data (`id`, `state`, `where`, `element`, `quote`, and each
|
|
@@ -44,9 +49,9 @@ Answer a question with an answer, not a change.
|
|
|
44
49
|
You answer in the page's **replies file**, next to the page (`report.html` → `report.replies.js`), signed with your
|
|
45
50
|
own key. The key stays on this computer in `~/.pipeup/agent.json`; never put it in the page or its folder.
|
|
46
51
|
|
|
47
|
-
Run these commands exactly as written: `--yes` stops npx asking "Ok to proceed?", and `pipeup@
|
|
48
|
-
will give (some computers only accept packages a few days old). Every release
|
|
49
|
-
pre-release page's prompt names its pre-release; if npm refuses that one, use `pipeup@
|
|
52
|
+
Run these commands exactly as written: `--yes` stops npx asking "Ok to proceed?", and `pipeup@1` takes any release npm
|
|
53
|
+
will give (some computers only accept packages a few days old). Every 1.x release answers them the same way. A
|
|
54
|
+
pre-release page's prompt names its pre-release; if npm refuses that one, use `pipeup@1`.
|
|
50
55
|
|
|
51
56
|
`--page` is **the HTML file that runs Pipeup**, the one the author opened, never a file it shows: on a viewer such as
|
|
52
57
|
`wiki/viewer.html?file=notes.md`, pass `wiki/viewer.html`. The prompt the author copies names it. If you can't tell,
|
|
@@ -58,13 +63,13 @@ and lists it; without `--yes` it only shows the change. The author also needs th
|
|
|
58
63
|
key and adds the add-on for you):
|
|
59
64
|
|
|
60
65
|
```bash
|
|
61
|
-
npx --yes pipeup@
|
|
66
|
+
npx --yes pipeup@1 agent --name Claude --page report.html --yes
|
|
62
67
|
```
|
|
63
68
|
|
|
64
69
|
Then, for each thread:
|
|
65
70
|
|
|
66
71
|
```bash
|
|
67
|
-
npx --yes pipeup@
|
|
72
|
+
npx --yes pipeup@1 reply --page report.html --thread <Thread id> "Changed the 20% to 15 to 20%, in the second paragraph." --addressed "addressed in revision 2"
|
|
68
73
|
```
|
|
69
74
|
|
|
70
75
|
It says where it wrote the replies, and, if the page doesn't list you yet, that the page will ignore them until it does.
|
|
@@ -100,7 +105,7 @@ addressed: short note, only if you made the change
|
|
|
100
105
|
````
|
|
101
106
|
|
|
102
107
|
If you keep a Pipeup key between sessions (`~/.pipeup/agent.json`), sign each reply so it shows as yours rather than as
|
|
103
|
-
pasted by the author: `npx --yes pipeup@
|
|
108
|
+
pasted by the author: `npx --yes pipeup@1 reply --print --doc <document id> --thread <Thread id> "…" --addressed "…"` prints the
|
|
104
109
|
entry, signed (Copy for my agent gives the document id). Ask the author to list your key only when you can sign; if you
|
|
105
110
|
can't keep a key, the plain block works and the reply shows as pasted by them.
|
|
106
111
|
|
|
@@ -5,7 +5,7 @@ description: Use when creating or editing an HTML document, slide deck, report,
|
|
|
5
5
|
|
|
6
6
|
# Add Pipeup to a page: the full reference
|
|
7
7
|
|
|
8
|
-
Written for Pipeup 0.
|
|
8
|
+
Written for Pipeup 1.0.0 For a quick "add comments to this page", [pipeup-add](https://pipeup-ai.github.io/pipeup/skills/pipeup-add/SKILL.md) is the short version; this is the full reference. This skill is published at https://pipeup-ai.github.io/pipeup/skills/pipeup-integrate/SKILL.md. Its companions: [summarise](https://pipeup-ai.github.io/pipeup/skills/pipeup-summarise/SKILL.md), [apply](https://pipeup-ai.github.io/pipeup/skills/pipeup-apply/SKILL.md).
|
|
9
9
|
|
|
10
10
|
Pipeup lets people comment on an HTML page in place: select text, click any element (including
|
|
11
11
|
buttons and charts) or drop a pin on a slide. Your job is to make the page *reviewable* while it
|
|
@@ -75,7 +75,7 @@ Then choose the options (see "Options" below): usually just the defaults.
|
|
|
75
75
|
- Just before `</body>`, add the script pinned to an exact version:
|
|
76
76
|
|
|
77
77
|
```html
|
|
78
|
-
<script src="https://cdn.jsdelivr.net/npm/pipeup@0.
|
|
78
|
+
<script src="https://cdn.jsdelivr.net/npm/pipeup@1.0.0/dist/pipeup.min.js"
|
|
79
79
|
integrity="sha384-…" crossorigin="anonymous"></script>
|
|
80
80
|
```
|
|
81
81
|
|
|
@@ -141,7 +141,7 @@ Then choose the options (see "Options" below): usually just the defaults.
|
|
|
141
141
|
never a revision, version or date: those change for every comment already made, which then counts as
|
|
142
142
|
somewhere else.
|
|
143
143
|
|
|
144
|
-
8. **Check, and fix until it passes:** once it ships, run `npx --yes pipeup@
|
|
144
|
+
8. **Check, and fix until it passes:** once it ships, run `npx --yes pipeup@1 check page.html`; until then, open the page and check the items below by eye. Fix every `fail`; fix
|
|
145
145
|
`warn` items unless the author says otherwise. Typical fixes:
|
|
146
146
|
- *layout changed* — you edited styles or wrappers; undo that.
|
|
147
147
|
- *closed UI overlaps content* — add `data-pipeup-ignore` to a floating element that shouldn't be covered, or set
|
|
@@ -160,7 +160,7 @@ Then choose the options (see "Options" below): usually just the defaults.
|
|
|
160
160
|
- Don't wrap content in new elements or add classes for Pipeup.
|
|
161
161
|
- Don't add inline styles, z-index changes or padding "for the comment column".
|
|
162
162
|
- Don't load the script from anywhere but the pinned CDN URL
|
|
163
|
-
(`https://cdn.jsdelivr.net/npm/pipeup@0.
|
|
163
|
+
(`https://cdn.jsdelivr.net/npm/pipeup@1.0.0/dist/pipeup.min.js`, with the `integrity` value from
|
|
164
164
|
the release notes) or a copy of that same file next to the page. Never use an unpinned URL.
|
|
165
165
|
- Don't put secrets in `data-pipeup-doc`; it *is* the document's key — anyone with the file can
|
|
166
166
|
read its feedback, which is the intended audience.
|
|
@@ -183,9 +183,12 @@ page opened from disk and in any script order, and they are released with Pipeup
|
|
|
183
183
|
with `data-pipeup-id`, `data-pipeup-ask="<question>"` and `data-pipeup-ask-kind` (`agree`, `choice` with
|
|
184
184
|
`data-pipeup-ask-options="One|Two"`, or none for words), and keep the question in the element's own words for anyone
|
|
185
185
|
without the add-on (https://pipeup-ai.github.io/pipeup/addons/inline.html.md). Never answer a question yourself.
|
|
186
|
+
Asks are compact and take the page's font. To match the page's look, set `--pipeup-ask-accent`, `--pipeup-ask-font`
|
|
187
|
+
and `--pipeup-ask-radius` in the page's CSS (on `:root` or one ask's element); don't hide or rebuild the ask's
|
|
188
|
+
controls. Pipeup's mark and a light tint of the accent always stay, so reviewers can see where to answer.
|
|
186
189
|
- **Ask first, and say in plain words what it sends and to whom** (the line above, and the add-on's README). Never
|
|
187
190
|
pick a sharing service yourself: the author chooses one.
|
|
188
|
-
- Add it as one more `<script>` after Pipeup's, pinned the same way (`https://cdn.jsdelivr.net/npm/@pipeup/share@0.
|
|
191
|
+
- Add it as one more `<script>` after Pipeup's, pinned the same way (`https://cdn.jsdelivr.net/npm/@pipeup/share@1.0.0/dist/share.min.js`
|
|
189
192
|
with its `integrity` from the release notes), or use the combined file `pipeup+share.min.js` instead of Pipeup's.
|
|
190
193
|
- Sharing is set up by the author with the command line (`npx @pipeup/share create page.html --server …`), which writes
|
|
191
194
|
`data-pipeup-share` into the file and prints a stop key once. **Never write `data-pipeup-share` yourself and never
|
|
@@ -228,7 +231,7 @@ page opened from disk and in any script order, and they are released with Pipeup
|
|
|
228
231
|
- **Letting an agent answer comments.** Only when the author asks. Agents read a page's comments with
|
|
229
232
|
`await Pipeup.comments()` (part of Pipeup itself) and answer in a replies file next to the page (`pipeup-apply` is the
|
|
230
233
|
skill for that). Showing those answers in the page is the **agents add-on**, so listing an agent means two things:
|
|
231
|
-
1. With the author's yes, the agent lists itself: `npx --yes pipeup@
|
|
234
|
+
1. With the author's yes, the agent lists itself: `npx --yes pipeup@1 agent --name Claude --page page.html --yes`
|
|
232
235
|
adds its public key to `<html>` as `data-pipeup-agents` (appended to an existing list) and changes nothing else.
|
|
233
236
|
Or add a key you were given by hand, keeping every entry. Never write a key you weren't given, and never put an
|
|
234
237
|
agent's private key in the page.
|
|
@@ -239,14 +242,42 @@ page opened from disk and in any script order, and they are released with Pipeup
|
|
|
239
242
|
sends the page's comments to the program on their computer; nothing leaves the computer. It also lets the agent
|
|
240
243
|
reply in threads and mark them addressed, never resolve or change anyone's comment. The page ignores replies from
|
|
241
244
|
keys it doesn't list. Without the add-on the page says so once in the browser console and no replies show.
|
|
242
|
-
On their own computer the author can instead run `npx --yes pipeup@
|
|
245
|
+
On their own computer the author can instead run `npx --yes pipeup@1 watch page.html --agent Claude`: it shows the page with a
|
|
243
246
|
**Share with my agent** switch (off until they turn it on), lists the agent while it runs, **adds the agents add-on to
|
|
244
|
-
the page it shows itself**, and lets the agent read with `npx --yes pipeup@
|
|
247
|
+
the page it shows itself**, and lets the agent read with `npx --yes pipeup@1 comments page.html`. Nothing is written into the
|
|
245
248
|
page file. (It refuses a page whose Pipeup is older than 0.6 and says what to change; a 0.6.x page already has agent
|
|
246
249
|
support built in.)
|
|
247
250
|
- `data-pipeup-live="auto"` makes "Go live" the default, but nobody connects before they have seen the sentence
|
|
248
251
|
about their network address. `data-pipeup-live-relays="wss://…,wss://…"` replaces the default meeting-point relays.
|
|
249
252
|
|
|
253
|
+
## A page with its own Comment button
|
|
254
|
+
|
|
255
|
+
A page can make reviewing part of its own design: a Comment button in its header instead of Pipeup's control in the
|
|
256
|
+
corner. Use Pipeup's page API (the instance `Pipeup.mount()` resolves to; it returns the running one if Pipeup started
|
|
257
|
+
on its own):
|
|
258
|
+
|
|
259
|
+
```html
|
|
260
|
+
<button id="comment" aria-pressed="false">Comment</button>
|
|
261
|
+
<button id="comments">Comments</button>
|
|
262
|
+
<script>
|
|
263
|
+
Pipeup.mount().then((pu) => {
|
|
264
|
+
const comment = document.getElementById("comment");
|
|
265
|
+
comment.addEventListener("click", () => pu.setCommentMode(!pu.commentMode));
|
|
266
|
+
// Heard however comment mode changed: this button, the shortcut, Esc or Pipeup's own control.
|
|
267
|
+
pu.on("change", (s) => comment.setAttribute("aria-pressed", String(s.commentMode)));
|
|
268
|
+
document.getElementById("comments").addEventListener("click", () => pu.openMenu());
|
|
269
|
+
});
|
|
270
|
+
</script>
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
- `pu.setCommentMode(on)`, `pu.commentMode` and `pu.on("change", fn)` start and stop comment mode and follow it.
|
|
274
|
+
- `pu.openMenu()` opens Pipeup's menu (All comments, Copy comments, Hide comments, the add-ons' rows) and
|
|
275
|
+
`pu.openAllComments()` opens All comments. What the menu holds is Pipeup's: a page can't remove a row.
|
|
276
|
+
- `data-pipeup-control="off"` on `<html>` hides Pipeup's control. Only do this when the page gives reviewers its own
|
|
277
|
+
way to the menu, because copying and sending comments live there; `pipeup check` warns if nothing calls
|
|
278
|
+
`openMenu()`. The shortcut keeps working.
|
|
279
|
+
- Change the reviewer's note to match: name your button instead of "the comment button in the bottom-right corner".
|
|
280
|
+
|
|
250
281
|
## Options
|
|
251
282
|
|
|
252
283
|
Markup on the page:
|
|
@@ -259,6 +290,7 @@ Markup on the page:
|
|
|
259
290
|
| `data-pipeup-addons` | `<html>` | Which add-ons may run, by id (`share,voice`; `none` for none). Without it every add-on runs. Keep every entry; add yours. |
|
|
260
291
|
| `data-pipeup-layout="column"` / `"bubbles"` | `<html>` | Force where comments show (column or bubbles). Pipeup reads it and never sets it. |
|
|
261
292
|
| `data-pipeup-auto="off"` | `<html>` | Don't start automatically; the page calls `Pipeup.mount()` itself. |
|
|
293
|
+
| `data-pipeup-control="off"` | `<html>` | Hide Pipeup's control, for a page with its own Comment button that opens Pipeup's menu (see "A page with its own Comment button"). |
|
|
262
294
|
| `data-pipeup-edition` | `<html>` | The edition the page shows (a daily briefing in one shell); set it again when the next is swapped in. Comments stay with their edition. |
|
|
263
295
|
| `data-pipeup-id` | any block | Stable identity so comments stay attached (Step 3). |
|
|
264
296
|
| `data-pipeup-label` | charts, images, icons | The name reviewers and AI tools see (Step 4). |
|
|
@@ -5,7 +5,7 @@ description: Use when someone wants Pipeup reviews saved as Markdown files in th
|
|
|
5
5
|
|
|
6
6
|
# Set up "Save to GitHub" or "Send to Git"
|
|
7
7
|
|
|
8
|
-
Written for Pipeup 0.
|
|
8
|
+
Written for Pipeup 1.0.0 This skill is published at https://pipeup-ai.github.io/pipeup/skills/pipeup-send-to-git-setup/SKILL.md.
|
|
9
9
|
|
|
10
10
|
Two example add-ons (written the way a company writes its own; **not** from the Pipeup project) get a review into Git as a
|
|
11
11
|
Markdown file, the same Markdown that Copy comments › As Markdown makes (each comment says where it is, ready for an AI to act on):
|
|
@@ -5,7 +5,7 @@ description: Use when someone has Pipeup feedback on an HTML page — text a rev
|
|
|
5
5
|
|
|
6
6
|
# Summarise Pipeup feedback
|
|
7
7
|
|
|
8
|
-
Written for Pipeup 0.
|
|
8
|
+
Written for Pipeup 1.0.0 This skill is published at https://pipeup-ai.github.io/pipeup/skills/pipeup-summarise/SKILL.md. Its companions: [integrate](https://pipeup-ai.github.io/pipeup/skills/pipeup-integrate/SKILL.md), [apply](https://pipeup-ai.github.io/pipeup/skills/pipeup-apply/SKILL.md).
|
|
9
9
|
|
|
10
10
|
## 1. Get the feedback as text
|
|
11
11
|
|