@commentkit/comment-kit 1.0.1 → 1.5.1

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 (77) hide show
  1. package/CHANGELOG.md +129 -1
  2. package/README.md +12 -5
  3. package/SECURITY.md +3 -1
  4. package/dist/npm/THIRD_PARTY_NOTICES.txt +22 -23
  5. package/dist/npm/chunks/AgentSend-DjFZSC0S.js +64 -0
  6. package/dist/npm/chunks/Checklist-BEz4IZdT.js +259 -0
  7. package/dist/npm/chunks/Composer-D1wbmdjF.js +681 -0
  8. package/dist/npm/chunks/Guest-CtyRy8Kz.js +170 -0
  9. package/dist/npm/chunks/MarkupEditor-CPH4yKx4.js +334 -0
  10. package/dist/npm/chunks/Panel-DSoUAlbQ.js +863 -0
  11. package/dist/npm/chunks/Settings-C_qV4n7J.js +206 -0
  12. package/dist/npm/chunks/{Shortcuts-3AOERWBh.js → Shortcuts-ChnaribX.js} +21 -17
  13. package/dist/npm/chunks/StyleEditor-DqZd6C5o.js +44 -0
  14. package/dist/npm/chunks/StylePanel-DMC3riYK.js +199 -0
  15. package/dist/npm/chunks/TaskFields-BfjjllMx.js +272 -0
  16. package/dist/npm/chunks/ThreadCard-DmKAelSL.js +1026 -0
  17. package/dist/npm/chunks/Viewer-mw69qSI5.js +110 -0
  18. package/dist/npm/chunks/agent-CqDO3JMA.js +146 -0
  19. package/dist/npm/chunks/anchor-OCQnjp_6.js +294 -0
  20. package/dist/npm/chunks/{ar-BVQ4ToG2.js → ar-BQ9K9Oqf.js} +188 -7
  21. package/dist/npm/chunks/card-bits-C7bIk5KX.js +126 -0
  22. package/dist/npm/chunks/client-dZeNdizE.js +754 -0
  23. package/dist/npm/chunks/colors-CAjY4jxf.js +137 -0
  24. package/dist/npm/chunks/confetti-DKeKR7-6.js +41 -0
  25. package/dist/npm/chunks/{de-CamSq76K.js → de-CcPi8xdC.js} +159 -7
  26. package/dist/npm/chunks/drafts-CpQdHhcK.js +51 -0
  27. package/dist/npm/chunks/{es-BBIlcnsU.js → es-DXgkjDCG.js} +159 -7
  28. package/dist/npm/chunks/extension-BFkXOmX5.js +50 -0
  29. package/dist/npm/chunks/{extension-CLm_T7Vj.js → extension-Gvei3opb.js} +2 -2
  30. package/dist/npm/chunks/{fr-BXsff0Zz.js → fr-IjJaUbWh.js} +159 -7
  31. package/dist/npm/chunks/{hi-y-APBuxh.js → hi-BhKQK2MU.js} +159 -7
  32. package/dist/npm/chunks/html2canvas-pro.esm-lgs6tb4C.js +8378 -0
  33. package/dist/npm/chunks/i18n-DAJGndZ2.js +904 -0
  34. package/dist/npm/chunks/{it-C5MH_Ktv.js → it-DKiSCkiD.js} +159 -7
  35. package/dist/npm/chunks/{ja-s1JJld2J.js → ja-BI1WagDg.js} +159 -7
  36. package/dist/npm/chunks/{live-CkVrNM1-.js → live-MvvBdoGd.js} +1 -1
  37. package/dist/npm/chunks/lock-C82sC17d.js +30 -0
  38. package/dist/npm/chunks/{nl-CFzRMEfl.js → nl-CJw3VUQ5.js} +159 -7
  39. package/dist/npm/chunks/pick-dDDLxCDI.js +120 -0
  40. package/dist/npm/chunks/{pt-BR-DE_r-5UM.js → pt-BR-CjBolC5g.js} +159 -7
  41. package/dist/npm/chunks/{pusher-BSsQoE1K.js → realtime-D22tI_AS.js} +58 -4
  42. package/dist/npm/chunks/source-BQS2_xfB.js +146 -0
  43. package/dist/npm/chunks/src-C_oUnL0i.js +150 -0
  44. package/dist/npm/chunks/start-C5-rebEU.js +1783 -0
  45. package/dist/npm/chunks/upload-CzPAjktW.js +42 -0
  46. package/dist/npm/chunks/uploads-tpLjiJdH.js +541 -0
  47. package/dist/npm/chunks/{zh-CN--gibO2l7.js → zh-CN-BrZGx2S0.js} +159 -7
  48. package/dist/npm/element.js +4 -5
  49. package/dist/npm/headless.js +3 -3
  50. package/dist/npm/index.js +2 -2
  51. package/dist/npm/react.js +1 -1
  52. package/dist/npm/svelte.js +1 -1
  53. package/dist/npm/types/adapters/vue.d.ts +14 -0
  54. package/dist/npm/types/anchor/index.d.ts +22 -1
  55. package/dist/npm/types/core/api.d.ts +3 -0
  56. package/dist/npm/types/core/auth.d.ts +11 -0
  57. package/dist/npm/types/core/client.d.ts +128 -6
  58. package/dist/npm/types/core/types.d.ts +78 -4
  59. package/dist/npm/types/headless.d.ts +1 -1
  60. package/dist/npm/types/index.d.ts +6 -1
  61. package/dist/npm/vue.js +5 -1
  62. package/package.json +6 -3
  63. package/dist/npm/chunks/Guest-CdfnuD8T.js +0 -157
  64. package/dist/npm/chunks/MarkupEditor-Clb17Tse.js +0 -199
  65. package/dist/npm/chunks/Panel-CgvEbZXr.js +0 -438
  66. package/dist/npm/chunks/ThreadCard-DuGKe-gE.js +0 -817
  67. package/dist/npm/chunks/anchor-DT-Ynhh1.js +0 -270
  68. package/dist/npm/chunks/art-Bn9_ANNS.js +0 -155
  69. package/dist/npm/chunks/client-CS5oL_LQ.js +0 -620
  70. package/dist/npm/chunks/colors-CX-IPjvb.js +0 -86
  71. package/dist/npm/chunks/extension-DWHHer7j.js +0 -26
  72. package/dist/npm/chunks/format-CP2xZaec.js +0 -524
  73. package/dist/npm/chunks/html2canvas-DfGb8yka.js +0 -4024
  74. package/dist/npm/chunks/mount-VmnAiANB.js +0 -1507
  75. package/dist/npm/chunks/privacy-DLhezjyi.js +0 -30
  76. package/dist/npm/chunks/realtime-CBRW9BB3.js +0 -34
  77. package/dist/npm/chunks/src-DG8ehgE9.js +0 -549
package/CHANGELOG.md CHANGED
@@ -1,6 +1,134 @@
1
1
  # Changelog
2
2
 
3
- ## [Unreleased]
3
+ ## 1.5.1 (2026-10-28)
4
+
5
+ - **Screenshots keep the page's look on every site:** the screenshot copies the page, and that copy asked the server for each linked stylesheet again without waiting for it. On a slow server or a cold CDN the screenshot came out unstyled (plain fonts, blue links). The copy now reuses the styles the page already has, in the same order, and waits briefly for any it cannot read. No Content Security Policy is touched.
6
+ - **A clearer attachment icon** in the comment box and the file list.
7
+
8
+ ## 1.5.0 (2026-10-24)
9
+
10
+ - **Guests see who gets their details:** under the name and email fields for share-link guests, a short line says the name, email and comments go to the team that runs the website and to CommentKit, with a link to the privacy notice. In all 11 languages.
11
+
12
+ Fixes from the full audit of 24 October. Pair it with the backend release of the same day: the widget still works with an older server, but readable errors, edit conflicts and safe retries need the new one.
13
+
14
+ - **Staying signed in:** a revoked or expired session asks you to sign in again instead of retrying for ever, and several open tabs waking up together no longer sign each other out (the refresh runs in one tab at a time and gives up after 10 seconds without losing the session). "You appear to be offline" shows only when the browser really is offline.
15
+ - **The right person, live:** after signing out, switching account or going from guest to member, live updates reconnect for the new person and never keep the previous person's inbox or team presence.
16
+ - **Comments never fail over build details:** a branch like `fix#12`, an upper-case commit or a `data-ck-src` / `data-ck-id` value the server would refuse is left out with one console warning, and the comment posts.
17
+ - **The task description shows in the card** (read-only, folded when long), and "Copy for AI agent" and "Send to agent" include it.
18
+ - **Long conversations show every message**, including replies past the first 100, and agent prompts include them too.
19
+ - **"30+ results" and Show more** in the inbox lists (All pages, search, filters) while there are more.
20
+ - **Undo after "Looks good — resolve"** works for reviewers and puts the previous status back; when it is too late, a plain message says to reopen instead.
21
+ - **Edits don't overwrite each other:** when someone else changed a message or description a moment ago, the card says so, refreshes and shows their version. Editing a message notifies people newly @mentioned in it (whole names only: "Ann" no longer matches "Annabel").
22
+ - **Due dates are calendar days** everywhere, with no shift by a day west of UTC. The widget sends `YYYY-MM-DD`.
23
+ - **Safer retries:** uploads, "mark read" and a request the server is still working on are retried without ever counting twice.
24
+ - **More privacy in screenshots and diagnostics:** screenshots now also grey out email, phone and address fields, and console capture removes email addresses. Network diagnostics also record the site's own `/api/v1/` failures.
25
+ - A card opened from an email link is marked read. Fewer requests overall: no mark-read call when nothing is unread, one refetch after "Mark all as read", one address check instead of two.
26
+ - Arabic uses the right plural forms; a new comment's checklist stops at 30 items instead of dropping the 31st silently.
27
+ - **Smaller on pages where the widget stays hidden:** `init()` now downloads about 9.7 KB instead of 19.9 KB; the strings, console capture and widget load only when it shows.
28
+
29
+ Worth knowing when upgrading:
30
+
31
+ - Reviewers see more grey boxes in screenshots (email, phone and address fields).
32
+ - `due_at` values are dates (`2026-10-24`), not date-times. Code that parsed them as instants should read them as days.
33
+ - The browser extension talks to this widget over a private channel; with widget 1.4 and older it falls back to the built-in screenshot.
34
+
35
+ For developers:
36
+
37
+ - New: `allMessages(threadId, { refresh })` (every message, following `next_cursor`), `inboxPage()`, and `EDIT_CONFLICT` (exported from `/headless`); `editMessage(id, body, { mentionIds })`. Message objects carry `etag`; inbox items' `kind` is typed as `InboxKind`.
38
+ - Config re-reads send `X-CommentKit-Load: 0` and `If-None-Match`, so they no longer count as widget loads and cost a 304 when nothing changed.
39
+ - The API contract constants (key, branch, commit and source patterns, limits) are checked against `contract/openapi-v1.yaml` in CI.
40
+ - Size budgets now count every file loaded at each moment (see `scripts/check-dist.mjs`); the README lists the script-tag loader at about 1.3 KB.
41
+
42
+ ## 1.4.0 (2026-10-23)
43
+
44
+ - **Works through Google Tag Manager:** tag managers rebuild the script tag with only its address, so the loader also reads the key from it: `loader.js?project=pk_live_…`. A tag with no key now says so in the console instead of doing nothing.
45
+ - **Turbo, Livewire `wire:navigate` and htmx boost:** when the page change runs the tag again, the loader starts once (no more piled-up keyboard shortcuts), and pins keep up when the whole `<body>` is swapped.
46
+ - **Edit suggested style changes after sending:** the person who wrote the comment and the team get "Edit" on the thread's style changes. It opens the same panel, starting from the element's values and the changes already suggested, previews live, and Save replaces the list (`PATCH /threads/{id}` with `style_changes`). Cancel, Escape or closing the card puts the page back.
47
+ - **Short agent links keep the style changes:** one line per change inside the untrusted fence, fewer and shorter as the link runs out of room.
48
+ - **Comments inside nested previews:** comment mode reaches iframes inside iframes (up to four deep), iframes inside web components and web components inside iframes, and the comment finds its way back (`anchor.frames`, one hop per iframe; one plain iframe still uses `anchor.frame`). A cross-origin iframe at any level is commented on as a whole.
49
+ - **Quotes inside iframes and web components:** select text in a same-origin iframe (before or during comment mode) to quote it; quoted comments there are found again by their words and shaded in place.
50
+ - **Pins in iframes follow the iframe:** they move when the iframe's own page scrolls and hide when their spot is scrolled out of the iframe.
51
+
52
+ ## 1.3.0 (2026-10-23)
53
+
54
+ - **Suggest a style change:** on a comment about an element, "Adjust style" lists its font, colours, spacing, border, size and layout values. Change them and the page previews it live; the comment keeps each change as "font-size 48px → 40px" (or "removed"), the thread shows them with a Preview switch, and agent prompts, the MCP server and the CLI include them. The page is always put back when you close, send, cancel or the widget is removed.
55
+ - **Pins stay on their spot:** a pin hides while its spot is scrolled out of a scroll box or carousel instead of floating over the page, follows fixed bars without lagging, and catches up at once when an image loads or an accordion opens. Offsets are kept inside the element, so a pin stays on it at any screen width. Each pin remembers its element, so pages with many comments do less work.
56
+ - **Comment on anything you can see:** comment mode now reaches inside web components (open shadow roots, nested too) and same-origin iframes, and the comment finds its way back there (`anchor.shadow_path`, `anchor.frame`). Closed shadow roots and cross-origin iframes are commented on as a whole.
57
+ - **Sharper hover:** beside the words of a small inline element (a highlighted word, say), the outline goes to the paragraph around it.
58
+ - **Source locations without the build plugin, in development:** on local and dev builds of React (18 and 19), Vue, Svelte and Preact, comments record the file and line (`anchor.source`, when there's no `data-ck-src`) and the component (`anchor.component`), and agent prompts include them. Paths are made project-relative; nothing is read or loaded on production pages.
59
+
60
+ ## 1.2.1 (2026-10-23)
61
+
62
+ - **Open in Cursor** uses Cursor's app link, so Cursor opens straight away (tested in Cursor: it asks before creating the chat). **Open in Claude Code** starts in your clone of the project's linked GitHub repository.
63
+
64
+ ## 1.2.0 (2026-10-22)
65
+
66
+ - **Send to agent from the inbox:** choose comments (every shown one starts ticked, so the page, branch and filters decide) and send them in one prompt. **Open in Cursor**, **Claude Code** or **Codex** opens the agent with the prompt filled in (you press Enter); the full prompt is always on the clipboard too, and a batch too long for a link sends a shorter version there. For team members allowed to export for agents.
67
+ - **Agent prompts include priority and the checklist.**
68
+ - With the MCP server (1.1), `/fix_feedback` does the same from inside the agent.
69
+
70
+ ## 1.1.3 (2026-10-22)
71
+
72
+ - **Cmd/Ctrl+Shift+K is CommentKit's alone:** sites that open their own search on Cmd/Ctrl+K no longer open it as well. Plain Cmd/Ctrl+K still belongs to the site.
73
+ - **Pins step back under the site's own dialogs and menus** (a search box, a cookie banner, a modal) and come back when they close, instead of floating on top.
74
+
75
+ ## 1.1.2 (2026-10-22)
76
+
77
+ - **Sharper screenshots:** the widget now uses html2canvas-pro, so buttons, shadows, rounded corners and modern colours come out as you see them (before, backgrounds could slip off their text). Hidden "Skip to content" links and `<noscript>` fallbacks no longer print in a corner.
78
+ - **Drawing looks like the original design:** one slim toolbar with pen, line, box, circle and arrow (plus blur and text), seven colours, a width slider (1–12 px), undo, redo and clear, then Cancel and a tick to save. The page behind is only lightly dimmed.
79
+ - **Comment mode is calmer:** a thin line round the window with a soft glow that slowly breathes (still when reduced motion is on).
80
+
81
+ ## 1.1.1 (2026-10-22)
82
+
83
+ - **A simpler comment box:** no title bar (quoted text, if any, leads the card; Cancel and Esc close it) and no separate "details" box, since the comment says it all. The checklist stays.
84
+ - **Toasts are calm cards** in the widget's light or dark theme, with only a coloured icon for success or a problem, and a shorter connection message: "Couldn't reach CommentKit. Check your connection and try again."
85
+ - **A selected area shows dashes moving round it** (still when reduced motion is on).
86
+ - **A sign-in that leaves the page keeps your drawing** too, not only the checklist and task fields.
87
+ - A clearer paperclip, and the remove button on checklist items is centred.
88
+
89
+ ## 1.1.0 (2026-10-22)
90
+
91
+ Everything the old prototype did well, in one release: the full gap report (`docs/audit/react-ui-gap-2026-10-22.md`) as decided.
92
+
93
+ - **Several assignees** per comment (the first is the main one), set while writing or in the card; the inbox filters by any of them.
94
+ - **A checklist** on a comment: "+ Add a checklist" while writing, then tick, add and remove items in the card. The author and the team may change it.
95
+ - **Drawing on the screenshot** gets arrow, line, box, circle, pen, blur and text, eight colours, three sizes, undo, redo and clear.
96
+ - **Files upload as soon as you add them**, with progress, and images open in a full-screen viewer.
97
+ - **24 reactions** in a picker, drawn the same on every device.
98
+ - **Link previews** for links in comments (title and site only; the server fetches public pages, never images).
99
+ - **The inbox:** open a conversation inside it with Back, Previous and Next (J and K), filter by priority, "Created by me", several people or another branch, and see priority, reactions, checklist progress and assignees on each row, with Resolve and Copy link on hover. Your team shows in the header, with who is online.
100
+ - **Settings** in the More menu: your account, light, dark or system theme on this device, the team and their roles, the project's storage, and links to the dashboard and shortcuts.
101
+ - **Move the toolbar:** drag it (or use the arrow keys on its handle) to any corner or edge; it remembers where.
102
+ - **Calmer motion:** cards and the inbox grow from where you clicked and shrink back, new replies slide in, and resolving shows a little confetti. Double-click outside closes the inbox (a one-time tip says so).
103
+ - **Drag across text to quote it**, or drag anywhere else (or hold Shift) to mark an area.
104
+
105
+ - **Enter sends**, Shift+Enter starts a new line (on phones Enter stays a new line). Cmd/Ctrl+Enter still sends.
106
+ - **Formatting:** a small toolbar and Cmd/Ctrl+B, I, E and Shift+X for bold, italic, code and strikethrough. `_italic_`, `~~strike~~` and ``` code blocks ``` show properly, and pasted code becomes a code block.
107
+ - **Reply to one message** with a quote; the reply shows what it answers. **@names** are highlighted.
108
+ - **More in each conversation:** the text someone selected, a Details list (when it was left and resolved, the page, browser and window size), Copy text, Jump to latest, "No replies yet", "Reply to reopen…" on resolved feedback, and you can edit your first message.
109
+ - **Delete without a dialog:** it disappears at once with an Undo toast, and is deleted a few seconds later.
110
+ - **Pins:** hover one for a short preview; team members who can triage drag a pin to a better spot (with Undo).
111
+ - **Inbox:** sort (latest, oldest, priority), a filter count, Reset, "3 of 12", a clear button on search (focused when the inbox opens), author avatars, the exact date on hover, and a "Live updates paused" note with Retry when the connection drops.
112
+ - **Team members set priority, assignee and labels while writing** a new comment.
113
+ - **Toasts stack** (up to three) with success, info and error icons, and say "Comment updated" and "… is open again".
114
+ - **Cmd/Ctrl+Shift+K opens the inbox** while the widget is shown; **Hide CommentKit** is in the More menu, and the keys bring it back.
115
+ - **Links to a conversation open in place** when a single-page app follows them, without a reload.
116
+ - **Guest code step:** the code sends itself on the sixth digit, a wrong code clears the box, and "Send a new code" counts down a minute.
117
+ - **For developers:** `comment()` / `CommentKit.comment()` and the `mode` event for your own "Leave feedback" button, and `init({ tools })` to turn screenshots, drawing, quoting selected text or attachments off.
118
+ - **Reactions read well with screen readers** ("2 reactions: 👍, including you").
119
+ - Each lazy part of the widget now brings its own styles, so the first load stays small as features grow: the composer loads when you start commenting.
120
+
121
+ Fixed while testing on real sites (Laravel with Inertia Vue and React, Filament, Blade, Astro, and 14 framework starters):
122
+
123
+ - **Screenshots work on sites styled with modern colours** (Tailwind v4's `oklch()`); before, they were silently left out.
124
+ - **Sending before the screenshot is ready waits for it** instead of sending without it, and a page that can't be captured says so.
125
+ - **Signing in that leaves the page brings back everything you wrote**, details, checklist and task fields included, and the one-time sign-in code is never saved in a comment's address (even when the site's router writes it back).
126
+ - **Cards fit the window:** they open on the roomier side of the spot (clear of a quoted line or area) and only their middle scrolls, so the reply box and buttons are always visible; open cards sit above the toolbar.
127
+ - **Drop-downs open fully in view** (priority, assignee and label lists, inbox filters, the reaction picker), close when you click elsewhere, and are drawn by the widget, so strict Content Security Policies stay clean.
128
+ - **The field you add takes the typing** ("+ Add details", "+ Add a checklist").
129
+ - **Settings and Keyboard shortcuts open as a proper centred dialog** with the page dimmed behind, and the account line shows the owner as Owner.
130
+ - **The screenshot preview keeps one size**, so the card doesn't jump when it arrives, and drawing covers the toolbar too.
131
+ - A shorter comment-mode hint: "Click to comment · Drag to quote text or mark an area · Esc to stop".
4
132
 
5
133
  ## 1.0.1 (2026-10-22)
6
134
 
package/README.md CHANGED
@@ -120,6 +120,7 @@ init({
120
120
  locale: "fr", // default: <html lang>, then the browser (see Languages)
121
121
  auth: "auto", // "popup" | "redirect"
122
122
  shortcuts: true, // false turns off C, J / K, E and ? (Esc and Cmd/Ctrl+Shift+K stay)
123
+ tools: { screenshots: true, markup: true, text: true, attachments: true }, // turn parts of the comment tools off
123
124
  });
124
125
  ```
125
126
 
@@ -146,9 +147,10 @@ Only the widget is translated; the dashboard and emails are in English for now.
146
147
  ```ts
147
148
  const kit = init({ project: "pk_live_…" });
148
149
 
149
- kit.show(); // same as Cmd/Ctrl + Shift + K
150
+ kit.show(); // bring a hidden widget back (Cmd/Ctrl + Shift + K does too)
150
151
  kit.hide();
151
152
  kit.open("CK-12"); // show the widget and open one conversation (id or reference)
153
+ kit.comment(); // start comment mode from your own "Leave feedback" button; comment(false) stops it
152
154
  await kit.signIn(); // call from a click
153
155
  await kit.signOut();
154
156
  kit.session(); // { person, role, project, environment, capabilities } | null
@@ -156,7 +158,9 @@ kit.on("thread:created", ({ thread }) => {});
156
158
  kit.destroy(); // removes every trace from the page
157
159
  ```
158
160
 
159
- Events: `ready`, `session:change`, `thread:created`, `thread:updated`, `message:created`, and `error` (the widget could not start; `error.code` is listed at https://commentkit.dev/docs/errors).
161
+ Events: `ready`, `session:change`, `thread:created`, `thread:updated`, `message:created`, `mode` (`{ commenting }`, when comment mode starts or stops), and `error` (the widget could not start; `error.code` is listed at https://commentkit.dev/docs/errors).
162
+
163
+ While the widget is shown, **Cmd/Ctrl + Shift + K** opens or closes the inbox. People hide the widget from its **More** menu (Hide CommentKit), and the same keys bring it back.
160
164
 
161
165
  ### Script tag API: `window.CommentKit`
162
166
 
@@ -167,6 +171,7 @@ CommentKit.version; // "1.0.0"
167
171
  CommentKit.show(); // Promise
168
172
  CommentKit.hide();
169
173
  CommentKit.open("CK-12"); // or a thread id
174
+ CommentKit.comment(); // start comment mode (Promise); comment(false) stops it
170
175
  const onNew = ({ thread }) => console.log(thread.reference);
171
176
  CommentKit.on("thread:created", onNew);
172
177
  CommentKit.off("thread:created", onNew);
@@ -187,7 +192,7 @@ The easiest way: add `https://commentkit.dev/mcp` as a remote MCP server in Clau
187
192
  claude mcp add --transport http commentkit https://commentkit.dev/mcp
188
193
  ```
189
194
 
190
- Or run the server on your computer: create an agent token in **Project → Developers**, then add it to your agent:
195
+ Or run the server on your computer: create an agent token in **Project → Connect**, then add it to your agent:
191
196
 
192
197
  ```json
193
198
  {
@@ -195,12 +200,14 @@ Or run the server on your computer: create an agent token in **Project → Devel
195
200
  "commentkit": {
196
201
  "command": "npx",
197
202
  "args": ["-y", "comment-kit-mcp"],
198
- "env": { "COMMENT_KIT_PROJECT_ID": "123", "COMMENT_KIT_ACCESS_TOKEN": "…" }
203
+ "env": { "COMMENTKIT_PROJECT_ID": "123", "COMMENTKIT_TOKEN": "…" }
199
204
  }
200
205
  }
201
206
  }
202
207
  ```
203
208
 
209
+ **Send to agent from the inbox.** Team members choose comments in the inbox (all shown ones start ticked, so the page, branch and filters decide what goes) and send them in one prompt. **Open in Cursor**, **Open in Claude Code** and **Open in Codex** open the agent with the prompt filled in, never sent until you press Enter. The full prompt is always copied to the clipboard as well, for other agents and when a batch is too long for a link (then the link carries a shorter version). With the MCP server connected, `/fix_feedback` does the same from inside the agent.
210
+
204
211
  Agents can list, search and read feedback and dashboard tasks (including the screenshot, by id or `CK-12`). With the permissions you choose, they can reply, link the commit and mark a task **ready for review**; by default a person approves each of these first (Agent requests). The reviewer then checks and resolves it. Agents never resolve, assign or delete. See [`mcp/README.md`](mcp/README.md).
205
212
 
206
213
  ## Terminal and build tools
@@ -221,7 +228,7 @@ Agents can list, search and read feedback and dashboard tasks (including the scr
221
228
 
222
229
  | Loaded | Gzip |
223
230
  | --- | --- |
224
- | Script-tag loader (every page) | ~0.6 KB |
231
+ | Script-tag loader (every page) | ~1.3 KB |
225
232
  | Widget when activated (incl. Preact) | ~31 KB |
226
233
  | Screenshot engine (only while commenting) | ~51 KB |
227
234
  | Realtime (signed-in people only) | ~21 KB |
package/SECURITY.md CHANGED
@@ -18,7 +18,7 @@ Include, where possible:
18
18
 
19
19
  - A description of the vulnerability and its impact
20
20
  - Steps to reproduce (proof-of-concept code or a minimal host page)
21
- - The affected package and version (`@commentkit/comment-kit` or `comment-kit-mcp`)
21
+ - The affected package and version (for example `@commentkit/comment-kit` or `comment-kit-mcp`)
22
22
 
23
23
  ### Response expectations
24
24
 
@@ -34,6 +34,8 @@ This policy covers:
34
34
 
35
35
  - **The CommentKit SDK** (`@commentkit/comment-kit`): the script-tag loader, `init()`, the `<comment-kit>` element, and the React, Vue and Svelte helpers.
36
36
  - **The MCP server** (`comment-kit-mcp`, in `mcp/`).
37
+ - **The CLI** (`@commentkit/cli`, in `cli/`) and **the build plugins** (`@commentkit/build`, in `build/`).
38
+ - **The browser extension** (`extension/`), **the WordPress plugin** (`wordpress/commentkit`) and **the Zapier and Make apps** (`zapier/`, `make/`).
37
39
 
38
40
  Vulnerabilities in the hosted service (`commentkit.dev`, the dashboard and API) are welcome at the same address.
39
41
 
@@ -25,29 +25,28 @@ SOFTWARE.
25
25
 
26
26
  ---
27
27
 
28
- html2canvas@1.4.1 (MIT)
29
- Copyright (c) 2012 Niklas von Hertzen
30
-
31
- Permission is hereby granted, free of charge, to any person
32
- obtaining a copy of this software and associated documentation
33
- files (the "Software"), to deal in the Software without
34
- restriction, including without limitation the rights to use,
35
- copy, modify, merge, publish, distribute, sublicense, and/or sell
36
- copies of the Software, and to permit persons to whom the
37
- Software is furnished to do so, subject to the following
38
- conditions:
39
-
40
- The above copyright notice and this permission notice shall be
41
- included in all copies or substantial portions of the Software.
42
-
43
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
44
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
45
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
46
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
47
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
48
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
49
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
50
- OTHER DEALINGS IN THE SOFTWARE.
28
+ html2canvas-pro@2.5.2 (MIT)
29
+ MIT License
30
+
31
+ Copyright (c) 2024-present yorickshan and html2canvas-pro contributors
32
+
33
+ Permission is hereby granted, free of charge, to any person obtaining a copy
34
+ of this software and associated documentation files (the "Software"), to deal
35
+ in the Software without restriction, including without limitation the rights
36
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
37
+ copies of the Software, and to permit persons to whom the Software is
38
+ furnished to do so, subject to the following conditions:
39
+
40
+ The above copyright notice and this permission notice shall be included in all
41
+ copies or substantial portions of the Software.
42
+
43
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
47
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
48
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
49
+ SOFTWARE.
51
50
 
52
51
  ---
53
52
 
@@ -0,0 +1,64 @@
1
+ import { i as e, l as t, m as n, s as r, u as i } from "./i18n-DAJGndZ2.js";
2
+ import { n as a, t as o } from "./agent-CqDO3JMA.js";
3
+ import { _ as s } from "./start-C5-rebEU.js";
4
+ //#region src/ui/AgentSend.tsx
5
+ var c = {
6
+ cursor: "Cursor",
7
+ claude: "Claude Code",
8
+ codex: "Codex"
9
+ }, l = "commentkit:agent";
10
+ function u({ client: u, threads: d, onDone: f, onError: p, onClose: m }) {
11
+ let [h, g] = n(null), _ = d.slice(0, 25);
12
+ i(() => {
13
+ let e = !0;
14
+ return Promise.all(_.map((e) => u.allMessages(e.id).then((t) => ({
15
+ thread: e,
16
+ messages: t
17
+ })))).then((t) => e && g(t), (t) => e && (p(t), m())), () => void (e = !1);
18
+ }, []);
19
+ let v = "copy";
20
+ try {
21
+ v = localStorage.getItem(l) ?? "copy";
22
+ } catch {}
23
+ let y = [
24
+ "cursor",
25
+ "claude",
26
+ "codex",
27
+ "copy"
28
+ ], b = [v, ...y.filter((e) => e !== v)].filter((e) => y.includes(e)), x = (t) => {
29
+ if (!h) return;
30
+ let n = a(h);
31
+ navigator.clipboard?.writeText(n).catch(() => void 0);
32
+ try {
33
+ localStorage.setItem(l, t);
34
+ } catch {}
35
+ if (t === "copy") return f(e("agentCopied", h.length));
36
+ let { url: i, complete: s } = o(t, h, n, u.state.get().session?.repository ?? null), d = document.createElement("a");
37
+ d.href = i, d.rel = "noopener noreferrer", d.click(), f(r(s ? "agentOpened" : "agentOpenedShort", { agent: c[t] }));
38
+ };
39
+ return /* @__PURE__ */ t("div", {
40
+ class: "ck-menu ck-agent-menu",
41
+ role: "menu",
42
+ "aria-label": r("sendToAgent"),
43
+ ref: s,
44
+ onKeyDown: (e) => e.key === "Escape" && (e.stopPropagation(), m()),
45
+ children: [
46
+ /* @__PURE__ */ t("div", {
47
+ class: "ck-menu-head",
48
+ children: h ? e("agentReady", h.length) : r("agentPreparing")
49
+ }),
50
+ b.map((e) => /* @__PURE__ */ t("button", {
51
+ role: "menuitem",
52
+ disabled: !h,
53
+ onClick: () => x(e),
54
+ children: e === "copy" ? r("copyPrompt") : r("openIn", { agent: c[e] })
55
+ })),
56
+ d.length > 25 ? /* @__PURE__ */ t("p", {
57
+ class: "ck-muted ck-agent-note",
58
+ children: r("agentFirstOnly", { max: 25 })
59
+ }) : null
60
+ ]
61
+ });
62
+ }
63
+ //#endregion
64
+ export { u as AgentSend };
@@ -0,0 +1,259 @@
1
+ import { f as e, i as t, l as n, m as r, s as i, v as a } from "./i18n-DAJGndZ2.js";
2
+ import { d as o, h as s } from "./start-C5-rebEU.js";
3
+ //#region src/ui/art.tsx
4
+ var c = "M31.5 4.8C17.3 4.4 7 15.2 7 29c0 13 8.5 21.2 20.9 23 1.6.2 2.1 1.2 2.1 2.5v6.9c0 1.7 1.2 2.1 2.5.9 5.7-4.9 16-13.6 21.1-22.1 3.5-5.8 4.7-11.8 3.2-18.1C54.3 11.5 44.7 4.6 31.5 4.8Z", l = (e, t, r, i) => /* @__PURE__ */ n("path", {
5
+ class: i,
6
+ d: c,
7
+ transform: `translate(${e} ${t}) scale(${r})`
8
+ }), u = {
9
+ caughtUp: () => /* @__PURE__ */ n(a, { children: [
10
+ /* @__PURE__ */ n("path", {
11
+ class: "ck-art-w",
12
+ d: "M28 50l8-20h48l8 20v18H28z"
13
+ }),
14
+ /* @__PURE__ */ n("path", {
15
+ class: "ck-art-line",
16
+ d: "M28 50h19l4 6h18l4-6h19"
17
+ }),
18
+ l(44, 4, .5, "ck-art-a"),
19
+ /* @__PURE__ */ n("path", {
20
+ class: "ck-art-tick",
21
+ d: "M53 19l5 5 9-10"
22
+ })
23
+ ] }),
24
+ noFeedback: () => /* @__PURE__ */ n(a, { children: [
25
+ /* @__PURE__ */ n("rect", {
26
+ class: "ck-art-w",
27
+ x: "22",
28
+ y: "18",
29
+ width: "70",
30
+ height: "52",
31
+ rx: "7"
32
+ }),
33
+ /* @__PURE__ */ n("path", {
34
+ class: "ck-art-line",
35
+ d: "M22 29h70"
36
+ }),
37
+ /* @__PURE__ */ n("circle", {
38
+ class: "ck-art-dot",
39
+ cx: "29",
40
+ cy: "23.5",
41
+ r: "1.6"
42
+ }),
43
+ /* @__PURE__ */ n("circle", {
44
+ class: "ck-art-dot",
45
+ cx: "35",
46
+ cy: "23.5",
47
+ r: "1.6"
48
+ }),
49
+ /* @__PURE__ */ n("rect", {
50
+ class: "ck-art-m",
51
+ x: "30",
52
+ y: "37",
53
+ width: "34",
54
+ height: "5",
55
+ rx: "2.5"
56
+ }),
57
+ /* @__PURE__ */ n("rect", {
58
+ class: "ck-art-m",
59
+ x: "30",
60
+ y: "47",
61
+ width: "46",
62
+ height: "5",
63
+ rx: "2.5"
64
+ }),
65
+ /* @__PURE__ */ n("rect", {
66
+ class: "ck-art-m",
67
+ x: "30",
68
+ y: "57",
69
+ width: "26",
70
+ height: "5",
71
+ rx: "2.5"
72
+ }),
73
+ l(70, 6, .46, "ck-art-a"),
74
+ /* @__PURE__ */ n("path", {
75
+ class: "ck-art-tick",
76
+ d: "M84.5 14v9M80 18.5h9"
77
+ })
78
+ ] }),
79
+ noMatch: () => /* @__PURE__ */ n(a, { children: [
80
+ /* @__PURE__ */ n("rect", {
81
+ class: "ck-art-m",
82
+ x: "22",
83
+ y: "22",
84
+ width: "52",
85
+ height: "6",
86
+ rx: "3"
87
+ }),
88
+ /* @__PURE__ */ n("rect", {
89
+ class: "ck-art-m",
90
+ x: "22",
91
+ y: "36",
92
+ width: "40",
93
+ height: "6",
94
+ rx: "3"
95
+ }),
96
+ /* @__PURE__ */ n("rect", {
97
+ class: "ck-art-m",
98
+ x: "22",
99
+ y: "50",
100
+ width: "46",
101
+ height: "6",
102
+ rx: "3"
103
+ }),
104
+ /* @__PURE__ */ n("circle", {
105
+ class: "ck-art-w",
106
+ cx: "76",
107
+ cy: "42",
108
+ r: "15"
109
+ }),
110
+ /* @__PURE__ */ n("path", {
111
+ class: "ck-art-line ck-art-bold",
112
+ d: "M87 53l11 11"
113
+ }),
114
+ /* @__PURE__ */ n("path", {
115
+ class: "ck-art-line",
116
+ d: "M70 42h12"
117
+ })
118
+ ] }),
119
+ error: () => /* @__PURE__ */ n(a, { children: [
120
+ l(36, 6, .75, "ck-art-m"),
121
+ /* @__PURE__ */ n("path", {
122
+ class: "ck-art-line ck-art-bold",
123
+ d: "M60 18v14"
124
+ }),
125
+ /* @__PURE__ */ n("circle", {
126
+ class: "ck-art-ink",
127
+ cx: "60",
128
+ cy: "40",
129
+ r: "2.4"
130
+ }),
131
+ /* @__PURE__ */ n("path", {
132
+ class: "ck-art-spark",
133
+ d: "M24 22l6 4M22 36h7M96 22l-6 4M98 36h-7"
134
+ })
135
+ ] }),
136
+ gone: () => /* @__PURE__ */ n(a, { children: l(36, 6, .75, "ck-art-ghost") })
137
+ };
138
+ function d({ name: e }) {
139
+ return /* @__PURE__ */ n("svg", {
140
+ class: "ck-art",
141
+ viewBox: "0 0 120 80",
142
+ width: "120",
143
+ height: "80",
144
+ "aria-hidden": "true",
145
+ focusable: "false",
146
+ children: [/* @__PURE__ */ n("ellipse", {
147
+ class: "ck-art-shadow",
148
+ cx: "60",
149
+ cy: "74",
150
+ rx: "34",
151
+ ry: "3.5"
152
+ }), u[e]()]
153
+ });
154
+ }
155
+ //#endregion
156
+ //#region src/ui/Checklist.tsx
157
+ function f({ client: t, thread: a, editable: c, onChange: l, onError: u }) {
158
+ let [d, f] = r(!1), [p, m] = r(""), [h, g] = r(!1), _ = a.checklist ?? [], v = _.filter((e) => e.done).length, y = e(a);
159
+ y.current = a;
160
+ let b = (e) => l(y.current = {
161
+ ...y.current,
162
+ checklist: e(y.current.checklist ?? [])
163
+ }), x = () => {
164
+ let e = p.trim();
165
+ e && !h && (g(!0), m(""), t.addChecklistItem(a.id, e).then((e) => b((t) => [...t, e]), (t) => {
166
+ m(e), u(t);
167
+ }).finally(() => g(!1)));
168
+ }, S = (e) => {
169
+ let n = {
170
+ ...e,
171
+ done: !e.done
172
+ }, r = (t) => b((n) => n.map((n) => n.id === e.id ? t : n));
173
+ r(n), t.updateChecklistItem(e.id, { done: n.done }).catch((t) => {
174
+ r(e), u(t);
175
+ });
176
+ }, C = (e) => {
177
+ let n = _.indexOf(e);
178
+ b((t) => t.filter((t) => t.id !== e.id)), t.deleteChecklistItem(e.id).catch((t) => {
179
+ b((t) => t.some((t) => t.id === e.id) ? t : [
180
+ ...t.slice(0, n),
181
+ e,
182
+ ...t.slice(n)
183
+ ]), u(t);
184
+ });
185
+ };
186
+ return !_.length && !c ? null : /* @__PURE__ */ n("div", {
187
+ class: "ck-extra",
188
+ children: [
189
+ _.length ? /* @__PURE__ */ n("div", {
190
+ class: "ck-checklist",
191
+ role: "group",
192
+ "aria-label": i("checklist"),
193
+ children: [/* @__PURE__ */ n("div", {
194
+ class: "ck-checklist-head",
195
+ children: [/* @__PURE__ */ n("span", {
196
+ class: "ck-muted",
197
+ children: i("checklistProgress", {
198
+ n: v,
199
+ total: _.length
200
+ })
201
+ }), /* @__PURE__ */ n("span", {
202
+ class: "ck-checklist-bar",
203
+ "aria-hidden": "true",
204
+ children: /* @__PURE__ */ n("span", { style: { width: `${Math.round(v / _.length * 100)}%` } })
205
+ })]
206
+ }), /* @__PURE__ */ n("ul", { children: _.map((e) => /* @__PURE__ */ n("li", {
207
+ "data-done": e.done || void 0,
208
+ children: [/* @__PURE__ */ n("label", {
209
+ class: "ck-check",
210
+ children: [/* @__PURE__ */ n("input", {
211
+ type: "checkbox",
212
+ checked: e.done,
213
+ disabled: !c,
214
+ onChange: () => S(e)
215
+ }), /* @__PURE__ */ n("bdi", { children: e.body })]
216
+ }), c ? /* @__PURE__ */ n("button", {
217
+ class: "ck-ghost ck-ghost-sm",
218
+ "aria-label": i("removeItem", { item: e.body }),
219
+ onClick: () => C(e),
220
+ children: /* @__PURE__ */ n(o, {
221
+ name: "close",
222
+ size: 12
223
+ })
224
+ }) : null]
225
+ })) })]
226
+ }) : null,
227
+ c && (d || _.length) ? /* @__PURE__ */ n("div", {
228
+ class: "ck-checklist-add",
229
+ children: /* @__PURE__ */ n("input", {
230
+ class: "ck-input",
231
+ maxLength: 300,
232
+ placeholder: i("checklistAdd"),
233
+ "aria-label": i("checklistAdd"),
234
+ value: p,
235
+ disabled: h,
236
+ ref: d && !_.length ? s : void 0,
237
+ onInput: (e) => m(e.target.value),
238
+ onKeyDown: (e) => {
239
+ e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), x()) : e.key === "Escape" && !_.length && f(!1);
240
+ }
241
+ })
242
+ }) : null,
243
+ c && !_.length && !d ? /* @__PURE__ */ n("div", {
244
+ class: "ck-extra-add",
245
+ children: /* @__PURE__ */ n("button", {
246
+ class: "ck-ghost ck-ghost-sm",
247
+ onClick: () => f(!0),
248
+ children: ["+ ", i("addChecklist")]
249
+ })
250
+ }) : null
251
+ ]
252
+ });
253
+ }
254
+ function p(e) {
255
+ let n = e.checklist ?? [];
256
+ return n.length ? t("checklistShort", n.length, { done: n.filter((e) => e.done).length }) : null;
257
+ }
258
+ //#endregion
259
+ export { p as n, d as r, f as t };