@macintacos/caret 1.0.0 → 1.0.2
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/.claude-plugin/plugin.json +1 -1
- package/README.md +45 -85
- package/bin/caret-launcher +1 -1
- package/dist/cli.js +4756 -17571
- package/opencode/caret.plugin.ts +1 -1
- package/package.json +1 -1
- package/ui/dist/assets/{angular-html-BrP7X_fT.js → angular-html-CNIx69MF.js} +1 -1
- package/ui/dist/assets/{angular-ts-CWSXPJ8_.js → angular-ts-B6ob15kD.js} +1 -1
- package/ui/dist/assets/{apl-DcDu9VfL.js → apl-BzQg5wKE.js} +1 -1
- package/ui/dist/assets/{astro-ZWhUFE02.js → astro-DQ6PiTON.js} +1 -1
- package/ui/dist/assets/{blade-Bnfid1aX.js → blade-DdGMUzbN.js} +1 -1
- package/ui/dist/assets/{c-DGhlaWFa.js → c-DhrAH2di.js} +1 -1
- package/ui/dist/assets/{chapel-B80nA-Wv.js → chapel-BIJH6n90.js} +1 -1
- package/ui/dist/assets/{cobol-BxPmMgGq.js → cobol-CR-dFJ1T.js} +1 -1
- package/ui/dist/assets/{coffee-qvFLvdPC.js → coffee-DWT27RO5.js} +1 -1
- package/ui/dist/assets/{cpp-BGBu9Yb6.js → cpp-CuONTEvg.js} +1 -1
- package/ui/dist/assets/{crystal-CV45eR73.js → crystal-Bvc0l-OM.js} +1 -1
- package/ui/dist/assets/{css-CBPwQP3-.js → css-BYejQHVV.js} +1 -1
- package/ui/dist/assets/{dist-CpcSX-YP.js → dist-BbAsmjOe.js} +1 -1
- package/ui/dist/assets/{dist-Dfm7Znx4.js → dist-BgZhLp84.js} +1 -1
- package/ui/dist/assets/{dist-Dj96YS5k.js → dist-Bn_ExXCc.js} +1 -1
- package/ui/dist/assets/{dist-418qtW5O.js → dist-C-FIXuZc.js} +1 -1
- package/ui/dist/assets/{dist-1bUsa9So.js → dist-CCPLuvXB.js} +1 -1
- package/ui/dist/assets/{dist-DWzXdmaf.js → dist-COogZ9jg.js} +1 -1
- package/ui/dist/assets/{dist-Dz8bokki.js → dist-Cuerw0_4.js} +1 -1
- package/ui/dist/assets/{dist-cV3QBg-W.js → dist-D-lJ6tIg.js} +1 -1
- package/ui/dist/assets/{dist-BafAgSat.js → dist-DV7t-p4N.js} +1 -1
- package/ui/dist/assets/{dist-Cj-JdNZd.js → dist-RKZBj-sl.js} +1 -1
- package/ui/dist/assets/{edge-Co6ItTYI.js → edge-B_-8Eolr.js} +1 -1
- package/ui/dist/assets/{elixir-0YZEZ0gv.js → elixir-CAhwbI74.js} +1 -1
- package/ui/dist/assets/{elm-BkRJOygl.js → elm-yg-VSwEl.js} +1 -1
- package/ui/dist/assets/{erb-BI2P49U3.js → erb-CIMOpWGO.js} +1 -1
- package/ui/dist/assets/{git-rebase-Bq5iIXzt.js → git-rebase-DI22snkc.js} +1 -1
- package/ui/dist/assets/{glimmer-js-BbOUbDIt.js → glimmer-js-CZHZNAs-.js} +1 -1
- package/ui/dist/assets/{glimmer-ts-CNnsk0yJ.js → glimmer-ts-C2rq-JGq.js} +1 -1
- package/ui/dist/assets/{glsl-BGnMm0dJ.js → glsl-ByXN6hIN.js} +1 -1
- package/ui/dist/assets/{graphql-7Z7p0nC9.js → graphql-DiiJwLqR.js} +1 -1
- package/ui/dist/assets/{hack-DqHfN4B0.js → hack-hQSSm1D1.js} +1 -1
- package/ui/dist/assets/{haml-3nZzM1j8.js → haml-cf9hcOgw.js} +1 -1
- package/ui/dist/assets/{handlebars-D76GLv5_.js → handlebars-B3tg892p.js} +1 -1
- package/ui/dist/assets/{html-KRo6nO5U.js → html-CkIr2qlC.js} +1 -1
- package/ui/dist/assets/{html-derivative-45dsHZ7G.js → html-derivative-U1EOyk5J.js} +1 -1
- package/ui/dist/assets/{http-Cd6yAfd3.js → http-ek0-hDT8.js} +1 -1
- package/ui/dist/assets/{hurl-DMRd-22O.js → hurl-DbN52Bpk.js} +1 -1
- package/ui/dist/assets/{index-DqZ7qZxG.js → index-uBaTjG1U.js} +211 -211
- package/ui/dist/assets/{java-C5BRRLzP.js → java-DXEu0FGs.js} +1 -1
- package/ui/dist/assets/{javascript-BEwOFxBm.js → javascript-Bi95ibpN.js} +1 -1
- package/ui/dist/assets/{jinja-DC6SxQM2.js → jinja-BcKnkqjY.js} +1 -1
- package/ui/dist/assets/{jison-BpM_G12u.js → jison-CFaHQ730.js} +1 -1
- package/ui/dist/assets/{json-DhXVH33S.js → json--ulVurkL.js} +1 -1
- package/ui/dist/assets/{jsx-QIa_kGnJ.js → jsx-ZonywBBD.js} +1 -1
- package/ui/dist/assets/{julia-BuS1ndKd.js → julia-Bnt3bGqT.js} +1 -1
- package/ui/dist/assets/{just-Dms5nmY6.js → just-CBpil8Tz.js} +1 -1
- package/ui/dist/assets/{latex-d0FSRalE.js → latex-D-qwKUqq.js} +1 -1
- package/ui/dist/assets/{liquid-Bq_YWguE.js → liquid-Bu8cI_b1.js} +1 -1
- package/ui/dist/assets/{lua-CqusOKbI.js → lua-DO_5Mymc.js} +1 -1
- package/ui/dist/assets/{marko-CfvdDxZz.js → marko-DJfs6dcc.js} +1 -1
- package/ui/dist/assets/{mdc-B_vZdcRe.js → mdc-CnkU1WJT.js} +1 -1
- package/ui/dist/assets/{nginx-YhyPrYEc.js → nginx-B5LxXEA3.js} +1 -1
- package/ui/dist/assets/{nim-UGiA-q4U.js → nim-DLTorTuD.js} +1 -1
- package/ui/dist/assets/{org-BWLiCWoV.js → org-DnNvsXCU.js} +1 -1
- package/ui/dist/assets/{perl-CXeAyAx6.js → perl-Q5Q2rA31.js} +1 -1
- package/ui/dist/assets/{php-C0Y5OILf.js → php-S65hjGBt.js} +1 -1
- package/ui/dist/assets/{pug-pavIHhZT.js → pug-k-MB8PEo.js} +1 -1
- package/ui/dist/assets/{qml-CbMVL_Hw.js → qml-Bf9cLRPv.js} +1 -1
- package/ui/dist/assets/{r-VbESC49D.js → r-Cr3hDQkZ.js} +1 -1
- package/ui/dist/assets/{razor-B4zmReq6.js → razor-BO5-wpmp.js} +1 -1
- package/ui/dist/assets/{regexp-CvzL3gAC.js → regexp-ffQ9gsih.js} +1 -1
- package/ui/dist/assets/{rst-B0YBcjx2.js → rst-B4AQC5xj.js} +1 -1
- package/ui/dist/assets/{ruby-BFx1yg1l.js → ruby-Dr8kfvLX.js} +1 -1
- package/ui/dist/assets/{sas-Bdz0EWxy.js → sas-Kuo2pLeL.js} +1 -1
- package/ui/dist/assets/{scss-Ar5qG57q.js → scss-Ci63BQ8y.js} +1 -1
- package/ui/dist/assets/{shellscript-BxZn-g_C.js → shellscript-DBh4gnVx.js} +1 -1
- package/ui/dist/assets/{shellsession-DdGjCUDJ.js → shellsession-L5KFvHI3.js} +1 -1
- package/ui/dist/assets/{soy-DNbG_b-4.js → soy-D6F5ilyd.js} +1 -1
- package/ui/dist/assets/{sql-BbO6oYzq.js → sql-xwRblxjL.js} +1 -1
- package/ui/dist/assets/{stata-CrT9A-Oi.js → stata-l8sBIGPT.js} +1 -1
- package/ui/dist/assets/{surrealql-_tFV7pCn.js → surrealql-DL2sOSzB.js} +1 -1
- package/ui/dist/assets/{svelte-ZdvR-T2J.js → svelte-Dp5d2Ja3.js} +1 -1
- package/ui/dist/assets/{templ-CpOqX9Rk.js → templ-B3LfgeSM.js} +1 -1
- package/ui/dist/assets/{tex-BnYgu1Tm.js → tex-CfLQjgEV.js} +1 -1
- package/ui/dist/assets/{ts-tags-CII1fKoY.js → ts-tags-BCfi6Eh_.js} +1 -1
- package/ui/dist/assets/{tsx-CPIX6Zti.js → tsx-BXhT7ita.js} +1 -1
- package/ui/dist/assets/{twig-Cpr1_Fdx.js → twig-t6tdMpRg.js} +1 -1
- package/ui/dist/assets/{typescript-CS1A4fih.js → typescript-CFIlDlxn.js} +1 -1
- package/ui/dist/assets/{typst-BEc_7GFB.js → typst-CVQ9ief2.js} +1 -1
- package/ui/dist/assets/{vue-DLe2p-nw.js → vue-D92U7PL6.js} +1 -1
- package/ui/dist/assets/{vue-html-CBsH80UM.js → vue-html-B_-4d7cG.js} +1 -1
- package/ui/dist/assets/{vue-vine-C6KcK89Z.js → vue-vine-LaG8znAe.js} +1 -1
- package/ui/dist/assets/{xml-CMmb8ycU.js → xml-DgAE0jfV.js} +1 -1
- package/ui/dist/assets/{xsl-vCAAt3o3.js → xsl-DkD8aIzS.js} +1 -1
- package/ui/dist/assets/{yaml-Be7JvL54.js → yaml-CEG92fN8.js} +1 -1
- package/ui/dist/index.html +1 -1
package/README.md
CHANGED
|
@@ -1,80 +1,53 @@
|
|
|
1
|
-
# 🥕 caret
|
|
1
|
+
# 🥕 `caret`
|
|
2
2
|
|
|
3
|
-
caret is a
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-

|
|
15
|
-
|
|
16
14
|
[Check out a short demo here!](https://youtu.be/zesv5AunUW4)
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
caret needs [`bun`](https://bun.sh) on your `PATH` — it runs from a `bun` bundle.
|
|
16
|
+

|
|
21
17
|
|
|
22
|
-
|
|
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
|
|
25
|
-
> [`doc/CONFIGURING.md`](doc/CONFIGURING.md#platform-support) for what differs on each
|
|
26
|
-
> platform and what to fall back on.
|
|
18
|
+
## Install
|
|
27
19
|
|
|
28
20
|
```sh
|
|
29
21
|
bunx --no-cache @macintacos/caret@latest install
|
|
30
22
|
```
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
detected.
|
|
24
|
+
> [!NOTE]
|
|
25
|
+
> `caret` supports macOS and Linux, where the review UI can run as a long-lived login
|
|
26
|
+
> service. Windows is best-effort and runs `caret` on demand only. See
|
|
27
|
+
> [`doc/CONFIGURING.md`](doc/CONFIGURING.md#platform-support) for what differs on each
|
|
28
|
+
> platform and what to fall back on.
|
|
38
29
|
|
|
39
|
-
|
|
40
|
-
|
|
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).
|
|
30
|
+
Assuming that you installed it as a long-lived service (the default), you can navigate to
|
|
31
|
+
<http://caret.localhost:42718> to see the `caret` UI.
|
|
47
32
|
|
|
48
|
-
|
|
33
|
+
After installing:
|
|
49
34
|
|
|
50
35
|
1. **Restart the agent.** OpenCode installs the plugin package on its next start.
|
|
51
36
|
2. **Run `/caret:demo`.** It presents a short demo plan that points at files in the repo
|
|
52
37
|
you run it from, so you can exercise the whole flow before a real one arrives.
|
|
53
38
|
|
|
54
|
-
|
|
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. |
|
|
39
|
+
### Running `caret` yourself
|
|
59
40
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
If you'd rather caret not start at login, answer **I'll run it myself** when
|
|
41
|
+
If you'd rather `caret` not start at login, answer **I'll run it myself** when
|
|
63
42
|
`caret install` asks. That removes the service if one is registered. Then, whenever you
|
|
64
43
|
want the review UI up, run:
|
|
65
44
|
|
|
66
45
|
```sh
|
|
67
|
-
bunx
|
|
46
|
+
bunx @macintacos/caret@latest serve
|
|
68
47
|
```
|
|
69
48
|
|
|
70
|
-
|
|
71
|
-
|
|
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.
|
|
49
|
+
This will keep the UI up at `http://caret.localhost:42718` until the process is
|
|
50
|
+
terminated.
|
|
78
51
|
|
|
79
52
|
### Updating and uninstalling
|
|
80
53
|
|
|
@@ -85,36 +58,27 @@ bunx --no-cache @macintacos/caret@latest install --refresh # update
|
|
|
85
58
|
bunx --no-cache @macintacos/caret@latest install --uninstall # remove
|
|
86
59
|
```
|
|
87
60
|
|
|
88
|
-
|
|
89
|
-
|
|
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
|
|
61
|
+
`caret`'s UI is designed to check for updates, at most once a day. When a newer `caret` is
|
|
62
|
+
out, the review UI says so once: a toast on load, a mark on the settings button, and a
|
|
99
63
|
**Settings → Updates** pane naming the version and the exact command to take it.
|
|
100
64
|
|
|
101
|
-
Turn the check off from that same pane, or by
|
|
102
|
-
`
|
|
65
|
+
Turn the check off from that same pane, or by hand in
|
|
66
|
+
[`config.toml`](doc/CONFIGURING.md#the-updates-table):
|
|
103
67
|
|
|
104
|
-
```
|
|
105
|
-
|
|
68
|
+
```toml
|
|
69
|
+
[updates]
|
|
70
|
+
check = false
|
|
106
71
|
```
|
|
107
72
|
|
|
108
73
|
See [the OpenCode adapter](doc/ARCHITECTURE.md#the-opencode-adapter) for the by-hand
|
|
109
74
|
equivalents, for pinning a version in OpenCode's `plugin` array, and for what each agent's
|
|
110
75
|
install touches; [the Claude Code adapter](doc/ARCHITECTURE.md#the-claude-code-adapter)
|
|
111
|
-
covers the hooks caret registers there.
|
|
76
|
+
covers the hooks `caret` registers there.
|
|
112
77
|
|
|
113
|
-
## Using caret
|
|
78
|
+
## Using `caret`
|
|
114
79
|
|
|
115
|
-
Whenever your agent presents a plan
|
|
116
|
-
|
|
117
|
-
prompt. There you:
|
|
80
|
+
Whenever your agent presents a plan, `caret` should intercept it and opens the plan in
|
|
81
|
+
your browser instead of the terminal prompt. There you:
|
|
118
82
|
|
|
119
83
|
- **Read** the plan as rendered HTML.
|
|
120
84
|
- **Annotate** — select any passage to attach an inline comment.
|
|
@@ -123,7 +87,7 @@ prompt. There you:
|
|
|
123
87
|
and re-present.
|
|
124
88
|
|
|
125
89
|
> [!TIP]
|
|
126
|
-
> You don't have to wait to be intercepted: caret gives both agents a plan-review tool
|
|
90
|
+
> You don't have to wait to be intercepted: `caret` gives both agents a plan-review tool
|
|
127
91
|
> they can call directly — `review_plan` in Claude Code (from the plugin's MCP server) and
|
|
128
92
|
> `caret_review_plan` in OpenCode — so a skill of your own can route its plan through the
|
|
129
93
|
> same review UI. The tool is for plans only; see
|
|
@@ -131,22 +95,11 @@ prompt. There you:
|
|
|
131
95
|
|
|
132
96
|
## Configuration
|
|
133
97
|
|
|
134
|
-
caret runs with sensible defaults and needs no configuration. To tune it — the daemon
|
|
98
|
+
`caret` runs with sensible defaults and needs no configuration. To tune it — the daemon
|
|
135
99
|
port, the review timeout, the log level — it reads an optional `config.toml` and `CARET_*`
|
|
136
100
|
environment variables. Every key, every variable, and their defaults are in
|
|
137
101
|
[`doc/CONFIGURING.md`](doc/CONFIGURING.md).
|
|
138
102
|
|
|
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
103
|
## Documentation
|
|
151
104
|
|
|
152
105
|
[`doc/README.md`](doc/README.md) maps the `doc/` directory — start there and it routes you
|
|
@@ -154,11 +107,18 @@ to the reference page that answers your question.
|
|
|
154
107
|
|
|
155
108
|
Two more live at the repo root:
|
|
156
109
|
|
|
157
|
-
- [CONTRIBUTING.md](CONTRIBUTING.md) — develop caret locally: setup, the `mise`
|
|
158
|
-
and where tests live.
|
|
110
|
+
- [CONTRIBUTING.md](CONTRIBUTING.md) — develop `caret` locally: setup, the `mise`
|
|
111
|
+
workflow, and where tests live.
|
|
159
112
|
- [CLAUDE.md](CLAUDE.md) — for coding agents: routes a change to the rules-of-the-road
|
|
160
113
|
that govern it.
|
|
161
114
|
|
|
115
|
+
## Diagnostics
|
|
116
|
+
|
|
117
|
+
- `/caret:discovery` prints a one-shot, read-only diagnostics snapshot of your install —
|
|
118
|
+
always redacted, and it never contains plan, prompt, or feedback bodies, nor any log
|
|
119
|
+
contents.
|
|
120
|
+
- `/caret:debug` reviews the current session's plans and recent errors.
|
|
121
|
+
|
|
162
122
|
## License
|
|
163
123
|
|
|
164
124
|
MIT — see [LICENSE](LICENSE). Vendored third-party assets (the Lucide icons) are itemized
|
package/bin/caret-launcher
CHANGED
|
@@ -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
|
|
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)"
|