@macintacos/caret 1.0.0 → 1.0.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 (93) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +43 -81
  3. package/bin/caret-launcher +1 -1
  4. package/dist/cli.js +173 -86
  5. package/opencode/caret.plugin.ts +1 -1
  6. package/package.json +1 -1
  7. package/ui/dist/assets/{angular-html-BrP7X_fT.js → angular-html-CNIx69MF.js} +1 -1
  8. package/ui/dist/assets/{angular-ts-CWSXPJ8_.js → angular-ts-B6ob15kD.js} +1 -1
  9. package/ui/dist/assets/{apl-DcDu9VfL.js → apl-BzQg5wKE.js} +1 -1
  10. package/ui/dist/assets/{astro-ZWhUFE02.js → astro-DQ6PiTON.js} +1 -1
  11. package/ui/dist/assets/{blade-Bnfid1aX.js → blade-DdGMUzbN.js} +1 -1
  12. package/ui/dist/assets/{c-DGhlaWFa.js → c-DhrAH2di.js} +1 -1
  13. package/ui/dist/assets/{chapel-B80nA-Wv.js → chapel-BIJH6n90.js} +1 -1
  14. package/ui/dist/assets/{cobol-BxPmMgGq.js → cobol-CR-dFJ1T.js} +1 -1
  15. package/ui/dist/assets/{coffee-qvFLvdPC.js → coffee-DWT27RO5.js} +1 -1
  16. package/ui/dist/assets/{cpp-BGBu9Yb6.js → cpp-CuONTEvg.js} +1 -1
  17. package/ui/dist/assets/{crystal-CV45eR73.js → crystal-Bvc0l-OM.js} +1 -1
  18. package/ui/dist/assets/{css-CBPwQP3-.js → css-BYejQHVV.js} +1 -1
  19. package/ui/dist/assets/{dist-CpcSX-YP.js → dist-BbAsmjOe.js} +1 -1
  20. package/ui/dist/assets/{dist-Dfm7Znx4.js → dist-BgZhLp84.js} +1 -1
  21. package/ui/dist/assets/{dist-Dj96YS5k.js → dist-Bn_ExXCc.js} +1 -1
  22. package/ui/dist/assets/{dist-418qtW5O.js → dist-C-FIXuZc.js} +1 -1
  23. package/ui/dist/assets/{dist-1bUsa9So.js → dist-CCPLuvXB.js} +1 -1
  24. package/ui/dist/assets/{dist-DWzXdmaf.js → dist-COogZ9jg.js} +1 -1
  25. package/ui/dist/assets/{dist-Dz8bokki.js → dist-Cuerw0_4.js} +1 -1
  26. package/ui/dist/assets/{dist-cV3QBg-W.js → dist-D-lJ6tIg.js} +1 -1
  27. package/ui/dist/assets/{dist-BafAgSat.js → dist-DV7t-p4N.js} +1 -1
  28. package/ui/dist/assets/{dist-Cj-JdNZd.js → dist-RKZBj-sl.js} +1 -1
  29. package/ui/dist/assets/{edge-Co6ItTYI.js → edge-B_-8Eolr.js} +1 -1
  30. package/ui/dist/assets/{elixir-0YZEZ0gv.js → elixir-CAhwbI74.js} +1 -1
  31. package/ui/dist/assets/{elm-BkRJOygl.js → elm-yg-VSwEl.js} +1 -1
  32. package/ui/dist/assets/{erb-BI2P49U3.js → erb-CIMOpWGO.js} +1 -1
  33. package/ui/dist/assets/{git-rebase-Bq5iIXzt.js → git-rebase-DI22snkc.js} +1 -1
  34. package/ui/dist/assets/{glimmer-js-BbOUbDIt.js → glimmer-js-CZHZNAs-.js} +1 -1
  35. package/ui/dist/assets/{glimmer-ts-CNnsk0yJ.js → glimmer-ts-C2rq-JGq.js} +1 -1
  36. package/ui/dist/assets/{glsl-BGnMm0dJ.js → glsl-ByXN6hIN.js} +1 -1
  37. package/ui/dist/assets/{graphql-7Z7p0nC9.js → graphql-DiiJwLqR.js} +1 -1
  38. package/ui/dist/assets/{hack-DqHfN4B0.js → hack-hQSSm1D1.js} +1 -1
  39. package/ui/dist/assets/{haml-3nZzM1j8.js → haml-cf9hcOgw.js} +1 -1
  40. package/ui/dist/assets/{handlebars-D76GLv5_.js → handlebars-B3tg892p.js} +1 -1
  41. package/ui/dist/assets/{html-KRo6nO5U.js → html-CkIr2qlC.js} +1 -1
  42. package/ui/dist/assets/{html-derivative-45dsHZ7G.js → html-derivative-U1EOyk5J.js} +1 -1
  43. package/ui/dist/assets/{http-Cd6yAfd3.js → http-ek0-hDT8.js} +1 -1
  44. package/ui/dist/assets/{hurl-DMRd-22O.js → hurl-DbN52Bpk.js} +1 -1
  45. package/ui/dist/assets/{index-DqZ7qZxG.js → index-uBaTjG1U.js} +211 -211
  46. package/ui/dist/assets/{java-C5BRRLzP.js → java-DXEu0FGs.js} +1 -1
  47. package/ui/dist/assets/{javascript-BEwOFxBm.js → javascript-Bi95ibpN.js} +1 -1
  48. package/ui/dist/assets/{jinja-DC6SxQM2.js → jinja-BcKnkqjY.js} +1 -1
  49. package/ui/dist/assets/{jison-BpM_G12u.js → jison-CFaHQ730.js} +1 -1
  50. package/ui/dist/assets/{json-DhXVH33S.js → json--ulVurkL.js} +1 -1
  51. package/ui/dist/assets/{jsx-QIa_kGnJ.js → jsx-ZonywBBD.js} +1 -1
  52. package/ui/dist/assets/{julia-BuS1ndKd.js → julia-Bnt3bGqT.js} +1 -1
  53. package/ui/dist/assets/{just-Dms5nmY6.js → just-CBpil8Tz.js} +1 -1
  54. package/ui/dist/assets/{latex-d0FSRalE.js → latex-D-qwKUqq.js} +1 -1
  55. package/ui/dist/assets/{liquid-Bq_YWguE.js → liquid-Bu8cI_b1.js} +1 -1
  56. package/ui/dist/assets/{lua-CqusOKbI.js → lua-DO_5Mymc.js} +1 -1
  57. package/ui/dist/assets/{marko-CfvdDxZz.js → marko-DJfs6dcc.js} +1 -1
  58. package/ui/dist/assets/{mdc-B_vZdcRe.js → mdc-CnkU1WJT.js} +1 -1
  59. package/ui/dist/assets/{nginx-YhyPrYEc.js → nginx-B5LxXEA3.js} +1 -1
  60. package/ui/dist/assets/{nim-UGiA-q4U.js → nim-DLTorTuD.js} +1 -1
  61. package/ui/dist/assets/{org-BWLiCWoV.js → org-DnNvsXCU.js} +1 -1
  62. package/ui/dist/assets/{perl-CXeAyAx6.js → perl-Q5Q2rA31.js} +1 -1
  63. package/ui/dist/assets/{php-C0Y5OILf.js → php-S65hjGBt.js} +1 -1
  64. package/ui/dist/assets/{pug-pavIHhZT.js → pug-k-MB8PEo.js} +1 -1
  65. package/ui/dist/assets/{qml-CbMVL_Hw.js → qml-Bf9cLRPv.js} +1 -1
  66. package/ui/dist/assets/{r-VbESC49D.js → r-Cr3hDQkZ.js} +1 -1
  67. package/ui/dist/assets/{razor-B4zmReq6.js → razor-BO5-wpmp.js} +1 -1
  68. package/ui/dist/assets/{regexp-CvzL3gAC.js → regexp-ffQ9gsih.js} +1 -1
  69. package/ui/dist/assets/{rst-B0YBcjx2.js → rst-B4AQC5xj.js} +1 -1
  70. package/ui/dist/assets/{ruby-BFx1yg1l.js → ruby-Dr8kfvLX.js} +1 -1
  71. package/ui/dist/assets/{sas-Bdz0EWxy.js → sas-Kuo2pLeL.js} +1 -1
  72. package/ui/dist/assets/{scss-Ar5qG57q.js → scss-Ci63BQ8y.js} +1 -1
  73. package/ui/dist/assets/{shellscript-BxZn-g_C.js → shellscript-DBh4gnVx.js} +1 -1
  74. package/ui/dist/assets/{shellsession-DdGjCUDJ.js → shellsession-L5KFvHI3.js} +1 -1
  75. package/ui/dist/assets/{soy-DNbG_b-4.js → soy-D6F5ilyd.js} +1 -1
  76. package/ui/dist/assets/{sql-BbO6oYzq.js → sql-xwRblxjL.js} +1 -1
  77. package/ui/dist/assets/{stata-CrT9A-Oi.js → stata-l8sBIGPT.js} +1 -1
  78. package/ui/dist/assets/{surrealql-_tFV7pCn.js → surrealql-DL2sOSzB.js} +1 -1
  79. package/ui/dist/assets/{svelte-ZdvR-T2J.js → svelte-Dp5d2Ja3.js} +1 -1
  80. package/ui/dist/assets/{templ-CpOqX9Rk.js → templ-B3LfgeSM.js} +1 -1
  81. package/ui/dist/assets/{tex-BnYgu1Tm.js → tex-CfLQjgEV.js} +1 -1
  82. package/ui/dist/assets/{ts-tags-CII1fKoY.js → ts-tags-BCfi6Eh_.js} +1 -1
  83. package/ui/dist/assets/{tsx-CPIX6Zti.js → tsx-BXhT7ita.js} +1 -1
  84. package/ui/dist/assets/{twig-Cpr1_Fdx.js → twig-t6tdMpRg.js} +1 -1
  85. package/ui/dist/assets/{typescript-CS1A4fih.js → typescript-CFIlDlxn.js} +1 -1
  86. package/ui/dist/assets/{typst-BEc_7GFB.js → typst-CVQ9ief2.js} +1 -1
  87. package/ui/dist/assets/{vue-DLe2p-nw.js → vue-D92U7PL6.js} +1 -1
  88. package/ui/dist/assets/{vue-html-CBsH80UM.js → vue-html-B_-4d7cG.js} +1 -1
  89. package/ui/dist/assets/{vue-vine-C6KcK89Z.js → vue-vine-LaG8znAe.js} +1 -1
  90. package/ui/dist/assets/{xml-CMmb8ycU.js → xml-DgAE0jfV.js} +1 -1
  91. package/ui/dist/assets/{xsl-vCAAt3o3.js → xsl-DkD8aIzS.js} +1 -1
  92. package/ui/dist/assets/{yaml-Be7JvL54.js → yaml-CEG92fN8.js} +1 -1
  93. package/ui/dist/index.html +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "caret",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Review, annotate, and approve Claude Code plans in a local web UI.",
5
5
  "author": { "name": "macintacos" },
6
6
  "homepage": "https://github.com/macintacos/caret",
package/README.md CHANGED
@@ -1,27 +1,27 @@
1
- # 🥕 caret
1
+ # 🥕 `caret`
2
2
 
3
- caret is a Claude Code (and OpenCode) plugin that replaces the terminal plan-approval
4
- prompt with a local web UI. When your agent presents a plan, caret opens it in your
5
- browser so you can read it as rendered HTML, **annotate passages inline** (Google-Docs
6
- style), and **approve** or **request changes** — your feedback flows straight back to the
7
- agent. A single local daemon is shared across concurrent sessions, so several in-flight
8
- plans can be reviewed from one browser tab via a switcher.
3
+ `caret` is a plugin that replaces the terminal plan-approval prompt with a local web UI.
4
+ When your agent presents a plan, `caret` opens it in your browser so you can read it as
5
+ rendered HTML, **annotate passages inline** (Google-Docs style), and **approve** or
6
+ **request changes**. Your feedback flows straight back to the agent. A single local daemon
7
+ is shared across concurrent sessions, so several in-flight plans can be reviewed from one
8
+ browser tab via a switcher.
9
9
 
10
- Want to develop caret rather than use it? Start with [CONTRIBUTING.md](CONTRIBUTING.md).
10
+ Want to develop `caret` rather than use it? Start with [CONTRIBUTING.md](CONTRIBUTING.md).
11
11
 
12
12
  ## Screenshots
13
13
 
14
- ![caret review UI with an inline annotation, stitched across four themes](doc/assets/caret-review-ui.png)
15
-
16
14
  [Check out a short demo here!](https://youtu.be/zesv5AunUW4)
17
15
 
16
+ ![caret review UI with an inline annotation, stitched across four themes](doc/assets/caret-review-ui.png)
17
+
18
18
  ## Install
19
19
 
20
- caret needs [`bun`](https://bun.sh) on your `PATH` — it runs from a `bun` bundle.
20
+ `caret` needs [`bun`](https://bun.sh) on your `PATH` — it runs from a `bun` bundle.
21
21
 
22
22
  > [!NOTE]
23
- > caret supports macOS and Linux, where the review UI can run as a login service (launchd
24
- > or systemd). Windows is best-effort and runs caret on demand only. See
23
+ > `caret` supports macOS and Linux, where the review UI can run as a long-lived login
24
+ > service. Windows is best-effort and runs `caret` on demand only. See
25
25
  > [`doc/CONFIGURING.md`](doc/CONFIGURING.md#platform-support) for what differs on each
26
26
  > platform and what to fall back on.
27
27
 
@@ -29,52 +29,27 @@ caret needs [`bun`](https://bun.sh) on your `PATH` — it runs from a `bun` bund
29
29
  bunx --no-cache @macintacos/caret@latest install
30
30
  ```
31
31
 
32
- That is the whole install — no `git clone`, no compile step. It detects which agents you
33
- have — [Claude Code](https://claude.com/claude-code), [OpenCode](https://opencode.ai), or
34
- both — asks which of them to install into, and registers the _published_ caret with each:
35
- prebuilt artifacts, the `/caret:*` slash commands, and the [rumdl](https://rumdl.dev/)
36
- plan formatter. Where it can't ask — off a terminal — it installs into every agent it
37
- detected.
38
-
39
- Every install at a terminal also asks whether to keep caret's review UI running all the
40
- time, and doesn't remember the answer. Keeping it running registers a service that starts
41
- at login and serves the UI at `http://caret.localhost:42718`; the other answer is
42
- [running caret yourself](#running-caret-yourself). Off a terminal it doesn't ask, and
43
- leaves the service however it finds it. To turn the service off later, run `caret install`
44
- and answer **I'll run it myself**, or use `--uninstall` — see
45
- [turning caret off](doc/RUNNING.md#turning-caret-off) and
46
- [the caret service](doc/RUNNING.md#the-caret-service).
32
+ Assuming that you installed it as a long-lived service (the default), you can navigate to
33
+ <http://caret.localhost:42718> to see the `caret` UI.
47
34
 
48
- Two steps finish the job:
35
+ After installing:
49
36
 
50
37
  1. **Restart the agent.** OpenCode installs the plugin package on its next start.
51
38
  2. **Run `/caret:demo`.** It presents a short demo plan that points at files in the repo
52
39
  you run it from, so you can exercise the whole flow before a real one arrives.
53
40
 
54
- | Flag | What it does |
55
- | ------------- | ----------------------------------------------------- |
56
- | `--dry-run` | Preview the run without changing anything. |
57
- | `--refresh` | Update an existing install. |
58
- | `--uninstall` | Remove caret from every agent, and from this machine. |
59
-
60
- ### Running caret yourself
41
+ ### Running `caret` yourself
61
42
 
62
- If you'd rather caret not start at login, answer **I'll run it myself** when
43
+ If you'd rather `caret` not start at login, answer **I'll run it myself** when
63
44
  `caret install` asks. That removes the service if one is registered. Then, whenever you
64
45
  want the review UI up, run:
65
46
 
66
47
  ```sh
67
- bunx --no-cache @macintacos/caret@latest serve
48
+ bunx @macintacos/caret@latest serve
68
49
  ```
69
50
 
70
- It keeps the UI up at `http://caret.localhost:42718` until you press Ctrl+C. If caret
71
- already started on demand, `serve` stops that copy and takes the port; if caret's service
72
- still holds it, `serve` says so and exits. Without `serve`, caret still works: it starts
73
- when your agent submits a plan, and stops about a minute after the last review is
74
- resolved.
75
-
76
- After updating caret, run `caret serve` again yourself: the first plan from the new
77
- version stops the old one, and nothing brings it back.
51
+ This will keep the UI up at `http://caret.localhost:42718` until the process is
52
+ terminated.
78
53
 
79
54
  ### Updating and uninstalling
80
55
 
@@ -85,36 +60,27 @@ bunx --no-cache @macintacos/caret@latest install --refresh # update
85
60
  bunx --no-cache @macintacos/caret@latest install --uninstall # remove
86
61
  ```
87
62
 
88
- An update picks its agents exactly as a fresh install does — the chooser at a terminal,
89
- detection otherwise — and at a terminal asks the review-UI question again; an uninstall
90
- takes every agent. Where caret's service stays registered, `--refresh` also cycles it onto
91
- the new version, and restarting each agent loads that agent's own updated copy. In
92
- OpenCode, caret toasts you at startup when a newer release is out; a plain `install` at a
93
- terminal runs its own check against npm and asks before taking it.
94
-
95
- caret's daemon runs the same check for itself, at most once a day. The call is
96
- unauthenticated and sends nothing about you — just a request to npm or GitHub, depending
97
- on how caret was installed, for the newest published version. When a newer caret is out,
98
- the review UI says so once: a toast on load, a mark on the settings button, and a
63
+ `caret`'s UI is designed to check for updates, at most once a day. When a newer `caret` is
64
+ out, the review UI says so once: a toast on load, a mark on the settings button, and a
99
65
  **Settings → Updates** pane naming the version and the exact command to take it.
100
66
 
101
- Turn the check off from that same pane, or by setting `updates.check` to `false` in
102
- `prefs.json` (`~/.local/state/caret/prefs.json`, or under `$XDG_STATE_HOME/caret`):
67
+ Turn the check off from that same pane, or by hand in
68
+ [`config.toml`](doc/CONFIGURING.md#the-updates-table):
103
69
 
104
- ```json
105
- { "updates": { "check": false } }
70
+ ```toml
71
+ [updates]
72
+ check = false
106
73
  ```
107
74
 
108
75
  See [the OpenCode adapter](doc/ARCHITECTURE.md#the-opencode-adapter) for the by-hand
109
76
  equivalents, for pinning a version in OpenCode's `plugin` array, and for what each agent's
110
77
  install touches; [the Claude Code adapter](doc/ARCHITECTURE.md#the-claude-code-adapter)
111
- covers the hooks caret registers there.
78
+ covers the hooks `caret` registers there.
112
79
 
113
- ## Using caret
80
+ ## Using `caret`
114
81
 
115
- Whenever your agent presents a plan — Claude Code's `ExitPlanMode`, or the Plan agent in
116
- OpenCode — caret intercepts it and opens it in your browser instead of the terminal
117
- prompt. There you:
82
+ Whenever your agent presents a plan, `caret` should intercept it and opens the plan in
83
+ your browser instead of the terminal prompt. There you:
118
84
 
119
85
  - **Read** the plan as rendered HTML.
120
86
  - **Annotate** — select any passage to attach an inline comment.
@@ -123,7 +89,7 @@ prompt. There you:
123
89
  and re-present.
124
90
 
125
91
  > [!TIP]
126
- > You don't have to wait to be intercepted: caret gives both agents a plan-review tool
92
+ > You don't have to wait to be intercepted: `caret` gives both agents a plan-review tool
127
93
  > they can call directly — `review_plan` in Claude Code (from the plugin's MCP server) and
128
94
  > `caret_review_plan` in OpenCode — so a skill of your own can route its plan through the
129
95
  > same review UI. The tool is for plans only; see
@@ -131,22 +97,11 @@ prompt. There you:
131
97
 
132
98
  ## Configuration
133
99
 
134
- caret runs with sensible defaults and needs no configuration. To tune it — the daemon
100
+ `caret` runs with sensible defaults and needs no configuration. To tune it — the daemon
135
101
  port, the review timeout, the log level — it reads an optional `config.toml` and `CARET_*`
136
102
  environment variables. Every key, every variable, and their defaults are in
137
103
  [`doc/CONFIGURING.md`](doc/CONFIGURING.md).
138
104
 
139
- ## Diagnostics
140
-
141
- - `/caret:discovery` prints a one-shot, read-only diagnostics snapshot of your install —
142
- always redacted, and it never contains plan, prompt, or feedback bodies, nor any log
143
- contents.
144
- - `/caret:debug` reviews the current session's plans and recent errors.
145
-
146
- Logs are written raw by default. `caret redact` writes scrubbed `*.redacted.log` copies
147
- alongside them — paste one of those into a chat, a gist, or an AI assistant, never the
148
- original. [`doc/RUNNING.md`](doc/RUNNING.md#logging--debugging) says where they live.
149
-
150
105
  ## Documentation
151
106
 
152
107
  [`doc/README.md`](doc/README.md) maps the `doc/` directory — start there and it routes you
@@ -154,11 +109,18 @@ to the reference page that answers your question.
154
109
 
155
110
  Two more live at the repo root:
156
111
 
157
- - [CONTRIBUTING.md](CONTRIBUTING.md) — develop caret locally: setup, the `mise` workflow,
158
- and where tests live.
112
+ - [CONTRIBUTING.md](CONTRIBUTING.md) — develop `caret` locally: setup, the `mise`
113
+ workflow, and where tests live.
159
114
  - [CLAUDE.md](CLAUDE.md) — for coding agents: routes a change to the rules-of-the-road
160
115
  that govern it.
161
116
 
117
+ ## Diagnostics
118
+
119
+ - `/caret:discovery` prints a one-shot, read-only diagnostics snapshot of your install —
120
+ always redacted, and it never contains plan, prompt, or feedback bodies, nor any log
121
+ contents.
122
+ - `/caret:debug` reviews the current session's plans and recent errors.
123
+
162
124
  ## License
163
125
 
164
126
  MIT — see [LICENSE](LICENSE). Vendored third-party assets (the Lucide icons) are itemized
@@ -154,7 +154,7 @@ stop_agent() {
154
154
  # anything when there is no `service` record — nothing here installed a
155
155
  # supervisor, so this launcher cannot know what still names it, and deleting
156
156
  # itself would leave whatever does respawning on ENOENT. Deleting only bin/ and
157
- # the records leaves prefs and review state for a reinstall.
157
+ # the records leaves review state for a reinstall.
158
158
  evict() {
159
159
  local service unit
160
160
  service="$(read_record "$records/service" || true)"