@leftoff/cli 0.0.0-stage → 0.6.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/marketplace.json +14 -0
- package/CHANGELOG.md +553 -0
- package/LICENSE.md +9 -0
- package/README.md +28 -2
- package/assets/sample-transcript.jsonl +12 -0
- package/bin/checkpoints.js +7 -0
- package/bin/leftoff.js +585 -0
- package/hooks/README.md +22 -0
- package/hooks/settings-hooks.example.json +82 -0
- package/mod/.claude-plugin/plugin.json +15 -0
- package/mod/hooks/core.js +1397 -0
- package/mod/hooks/hooks.json +4 -0
- package/mod/hooks/register.js +1006 -0
- package/package.json +45 -4
- package/templates/agent-feed-worker/README.md +45 -0
- package/templates/agent-feed-worker/src/index.js +69 -0
- package/templates/agent-feed-worker/wrangler.toml +20 -0
- package/ui/app.css +1264 -0
- package/ui/app.js +2979 -0
- package/ui/apple-touch-icon.png +0 -0
- package/ui/changelog-md.js +64 -0
- package/ui/favicon-32.png +0 -0
- package/ui/favicon-badge-32.png +0 -0
- package/ui/favicon-badge.svg +1 -0
- package/ui/favicon.ico +0 -0
- package/ui/favicon.svg +1 -0
- package/ui/go.js +68 -0
- package/ui/icon-192.png +0 -0
- package/ui/icon-512.png +0 -0
- package/ui/icon-maskable-512.png +0 -0
- package/ui/icons.js +41 -0
- package/ui/index.html +55 -0
- package/ui/manifest.webmanifest +37 -0
- package/ui/needs.js +197 -0
- package/ui/offline.css +11 -0
- package/ui/offline.html +24 -0
- package/ui/pair.html +31 -0
- package/ui/picker.js +294 -0
- package/ui/relay-client.js +187 -0
- package/ui/relay-crypto.js +155 -0
- package/ui/relay-pair.js +48 -0
- package/ui/repos.js +167 -0
- package/ui/settings-nav.js +23 -0
- package/ui/summary-examples.js +66 -0
- package/ui/sw.js +34 -0
- package/ui/theme.js +41 -0
- package/ui/vendor/LUCIDE-LICENSE.txt +45 -0
package/hooks/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Settings-hook fallback
|
|
2
|
+
|
|
3
|
+
Use this when mods can't run, for example under an org policy like `allowManagedModsOnly`, or when you just don't want the mod.
|
|
4
|
+
These are classic Claude Code settings hooks of type `command`. Each one runs `leftoff hook <Event>`, which works like this:
|
|
5
|
+
|
|
6
|
+
- it reads the hook's JSON from stdin and POSTs it to `http://127.0.0.1:7429/v1/hooks/<Event>`
|
|
7
|
+
- if the daemon is down, it spools the event to `~/checkpoints/.spool/<machine>/<session-id>/` so nothing is lost
|
|
8
|
+
- it always exits 0 and prints nothing, so it never blocks or changes Claude Code
|
|
9
|
+
|
|
10
|
+
Two hooks (0.4.4) are for Needs you:
|
|
11
|
+
|
|
12
|
+
- `PermissionRequest` (timeout 600 s) opens a request on the board and waits. If you answer on the board, it prints that decision; if you answer in the terminal, press Esc, or nobody answers, it prints nothing and Claude Code's own dialog decides. It never allows anything by itself.
|
|
13
|
+
- `PostToolUse` runs in the background (`async`) and tells the board when the terminal answered first, so the item clears.
|
|
14
|
+
|
|
15
|
+
There is no reply box in hooks-only mode: a settings hook can't type into a session, so the board offers Go instead.
|
|
16
|
+
|
|
17
|
+
Install them with `leftoff init --hooks` (`leftoff upgrade` refreshes them, which adds the two 0.4.4 hooks). That backs up `~/.claude/settings.json` and adds the hooks with absolute paths.
|
|
18
|
+
To add them by hand, copy `settings-hooks.example.json` into your settings (with `leftoff` on your PATH). `leftoff uninstall` removes only these hooks.
|
|
19
|
+
|
|
20
|
+
Hooks installed before 0.4.5 run `bin/checkpoints.js` and carry `--tag=checkpoints-hook`. They keep working (that file is now an alias of `bin/leftoff.js`), and `leftoff upgrade` replaces them with `--tag=leftoff-hook` ones, without duplicates.
|
|
21
|
+
|
|
22
|
+
Without the mod you get no heartbeat, no `/cp` or `/cp-name`, and no pane. The daemon infers idle time from the last event and makes checkpoints itself. Use the web UI's "Checkpoint now" button for a manual one.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "leftoff hook SessionStart",
|
|
9
|
+
"timeout": 5
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"UserPromptSubmit": [
|
|
15
|
+
{
|
|
16
|
+
"hooks": [
|
|
17
|
+
{
|
|
18
|
+
"type": "command",
|
|
19
|
+
"command": "leftoff hook UserPromptSubmit",
|
|
20
|
+
"timeout": 5
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"Stop": [
|
|
26
|
+
{
|
|
27
|
+
"hooks": [
|
|
28
|
+
{
|
|
29
|
+
"type": "command",
|
|
30
|
+
"command": "leftoff hook Stop",
|
|
31
|
+
"timeout": 5
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"Notification": [
|
|
37
|
+
{
|
|
38
|
+
"hooks": [
|
|
39
|
+
{
|
|
40
|
+
"type": "command",
|
|
41
|
+
"command": "leftoff hook Notification",
|
|
42
|
+
"timeout": 5
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"SessionEnd": [
|
|
48
|
+
{
|
|
49
|
+
"hooks": [
|
|
50
|
+
{
|
|
51
|
+
"type": "command",
|
|
52
|
+
"command": "leftoff hook SessionEnd",
|
|
53
|
+
"timeout": 2
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"PermissionRequest": [
|
|
59
|
+
{
|
|
60
|
+
"hooks": [
|
|
61
|
+
{
|
|
62
|
+
"type": "command",
|
|
63
|
+
"command": "leftoff hook PermissionRequest",
|
|
64
|
+
"timeout": 600
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"PostToolUse": [
|
|
70
|
+
{
|
|
71
|
+
"hooks": [
|
|
72
|
+
{
|
|
73
|
+
"type": "command",
|
|
74
|
+
"command": "leftoff hook PostToolUse",
|
|
75
|
+
"timeout": 5,
|
|
76
|
+
"async": true
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "leftoff",
|
|
3
|
+
"version": "0.6.2",
|
|
4
|
+
"description": "Leftoff (formerly Checkpoints): WTF was I working on? Tracks every Claude Code session on this machine, writes a 3-line checkpoint when one goes quiet, and adds /cp (checkpoint now), /cp-name and a /leftoff pane. Talks to the local Leftoff daemon on 127.0.0.1:7429 and falls back to writing markdown in ~/checkpoints.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Joel"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [
|
|
9
|
+
"sessions",
|
|
10
|
+
"checkpoints",
|
|
11
|
+
"status",
|
|
12
|
+
"digest",
|
|
13
|
+
"leftoff"
|
|
14
|
+
]
|
|
15
|
+
}
|