sessionpulse 0.2.1__tar.gz → 0.3.0__tar.gz

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 (36) hide show
  1. {sessionpulse-0.2.1/src/sessionpulse.egg-info → sessionpulse-0.3.0}/PKG-INFO +15 -12
  2. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/README.md +14 -11
  3. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/pyproject.toml +1 -1
  4. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/__init__.py +1 -1
  5. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/cli.py +5 -4
  6. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/config.py +1 -0
  7. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/followups.py +6 -1
  8. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/server.py +2 -1
  9. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/static/dashboard.html +552 -189
  10. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/todos.py +19 -3
  11. {sessionpulse-0.2.1 → sessionpulse-0.3.0/src/sessionpulse.egg-info}/PKG-INFO +15 -12
  12. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/tests/test_sessionpulse.py +40 -2
  13. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/LICENSE +0 -0
  14. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/setup.cfg +0 -0
  15. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/__main__.py +0 -0
  16. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/hook.py +0 -0
  17. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/icons/sessionpulse-busy.svg +0 -0
  18. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/icons/sessionpulse-idle.svg +0 -0
  19. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/icons/sessionpulse-none.svg +0 -0
  20. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/install.py +0 -0
  21. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/learn.py +0 -0
  22. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/reader.py +0 -0
  23. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/static/brand/favicon.svg +0 -0
  24. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/static/brand/session-pulse-idle-animated.svg +0 -0
  25. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/static/brand/session-pulse-idle-static.svg +0 -0
  26. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/static/brand/session-pulse-none-animated.svg +0 -0
  27. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/static/brand/session-pulse-none-static.svg +0 -0
  28. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/static/brand/session-pulse-working-animated.svg +0 -0
  29. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/static/brand/session-pulse-working-static.svg +0 -0
  30. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/status.py +0 -0
  31. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse/tray.py +0 -0
  32. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse.egg-info/SOURCES.txt +0 -0
  33. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse.egg-info/dependency_links.txt +0 -0
  34. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse.egg-info/entry_points.txt +0 -0
  35. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse.egg-info/requires.txt +0 -0
  36. {sessionpulse-0.2.1 → sessionpulse-0.3.0}/src/sessionpulse.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sessionpulse
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: A quiet instrument panel for Claude Code: live sessions, usage, and a to-do board that fills itself from your sessions. Local only.
5
5
  Author: Vijay Shukla
6
6
  License-Expression: MIT
@@ -69,30 +69,32 @@ It reads the files Claude Code already writes under `~/.claude`. **Nothing leave
69
69
 
70
70
  ## Screenshots
71
71
 
72
- <p align="center"><img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/overview.jpg" width="900" alt="Overview: live sessions, KPIs, to-do list and completed items"></p>
72
+ <p align="center"><img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/overview.jpg" width="900" alt="Overview: Needs you (decisions, blockers, old waits, follow-ups to review) beside the live sessions, then handoffs from ended sessions and an activity feed"></p>
73
73
 
74
- | To-dos that fill themselves | One board for everything you still owe |
74
+ | A page for every session | New follow-ups wait for your review |
75
75
  |---|---|
76
- | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/todo.jpg" alt="To-do list grouped by project, with follow-ups picked up from sessions"> | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/board.jpg" alt="Kanban board with colour-coded columns: Decide, Outside work, Waiting on, Checklist, Later, Added by me, Done"> |
76
+ | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/session.jpg" alt="Session page: the session's summary as a handoff, the resume command, its tasks, token use and details"> | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/board.jpg" alt="Board by status: Detected (with Accept and Not useful), To do, Doing, On hold, Done and Archived columns"> |
77
77
 
78
- | Get better at Claude Code | Light theme |
78
+ | Analytics | Light theme |
79
79
  |---|---|
80
- | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/learn.jpg" alt="Suggestions based on your usage, with links to free official docs and courses"> | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/overview-light.jpg" alt="The overview in the light theme"> |
80
+ | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/analytics.jpg" alt="Analytics: totals, a 26-week activity heatmap, the last 30 days, tokens per day by model and active hours per day"> | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/overview-light.jpg" alt="The overview in the light theme"> |
81
81
 
82
82
  *All screenshots use made-up data (`tools/showcase/`).*
83
83
 
84
84
  ## Features
85
85
 
86
+ - **Needs you:** the Overview opens with what is waiting on you: open decisions, things you've waited on for more than 3 days, blockers named in each project's latest session summary, and new follow-ups to review.
87
+ - **Pick up where you left off:** a summary of each session (goal, done, open, blocked on, next step), on its own page with the resume command and the tasks it left.
86
88
  - **Live sessions:** working or idle, running time, last change, tokens, model. The panel icon shows the count and turns orange while Claude is working.
87
- - **Follow-ups (optional):** Claude reads each session after 20 quiet minutes and adds what was left open to your to-do list, linked back to the session, with a one-click resume command. A later session that finishes an item closes it automatically.
89
+ - **Follow-ups (optional):** Claude reads each session after 20 quiet minutes and adds what was left open to your to-do list, linked back to the session, with a one-click resume command. New items wait in **Detected** until you **Accept** them or mark them **Not useful**, which steers later reads. A later session that finishes an item closes it automatically.
88
90
  - **Why is this here?** Each follow-up keeps a short quote from the session, checked against the transcript; **Why?** shows it in context. The same work showing up in another project is flagged, with **Merge** and **Not the same**.
89
- - **Board:** every to-do as a card, colour-coded by kind (Decide, Outside work, Waiting on, Checklist, Later), or by status (To do, Doing, Done). Drag and drop, project filter, search.
91
+ - **Board:** every to-do as a card, colour-coded by kind (Decide, Outside work, Waiting on, Checklist, Later), or by status (Detected, To do, Doing, On hold, Done, Archived). Drag and drop, project filter, search, export to Markdown, CSV or JSON.
90
92
  - **Your own to-dos too:** add them on the dashboard or with `sessionpulse todo add "…"`.
91
- - **Usage:** input, output and cache tokens per day, split by model; active hours per day; busiest projects.
93
+ - **Analytics:** a 26-week activity heatmap, the last 30 days at a glance, input, output and cache tokens per day by model, active hours per day, busiest projects.
92
94
  - **Starts and exits:** when each session started and ended, and why (`/clear`, Ctrl+D, logout…).
93
- - **History:** every session, searchable, with a copyable `claude --resume` command.
95
+ - **Sessions:** every session, searchable; each opens its own page with a copyable `claude --resume` command.
94
96
  - **Get better at Claude Code:** suggestions picked from how you actually work (no `CLAUDE.md` in busy projects, very long sessions, features you haven't tried), with free official docs and Anthropic Academy courses.
95
- - **Small and private:** standard library only, listens on `127.0.0.1`, needs a token, works in light and dark mode and on a phone screen.
97
+ - **Small and private:** standard library only, listens on `127.0.0.1`, needs a token, dark and light themes, works on a phone screen (bottom tab bar).
96
98
 
97
99
  ## Install
98
100
 
@@ -209,6 +211,7 @@ followups_model = "haiku"
209
211
  followups_idle_minutes = 20
210
212
  followups_days = 30
211
213
  followups_parallel = 3
214
+ followups_review = true # new follow-ups wait in Detected until you accept them
212
215
  claude_command = "" # path to `claude` if it isn't on PATH
213
216
  ```
214
217
 
@@ -216,7 +219,7 @@ claude_command = "" # path to `claude` if it isn't on PATH
216
219
 
217
220
  Off by default, because it uses Claude. When on, the dashboard server checks every 5 minutes for sessions that have been quiet for 20 minutes and changed since it last read them. It sends their prompts and Claude's replies to `claude -p` (Haiku by default) and asks only for what's still open. That counts toward your Claude usage: roughly one small Haiku request per session.
218
221
 
219
- The request runs with all hooks disabled and `--no-session-persistence`, so it never shows up as a session, in this dashboard or in any hook of yours. Items you dismiss are remembered and not picked up again.
222
+ The request runs with all hooks disabled and `--no-session-persistence`, so it never shows up as a session, in this dashboard or in any hook of yours. New follow-ups wait in the board's **Detected** column until you **Accept** them or mark them **Not useful**; set `followups_review = false` to add them straight to the list. Items you dismiss are remembered and not picked up again.
220
223
 
221
224
  ## Privacy and security
222
225
 
@@ -41,30 +41,32 @@ It reads the files Claude Code already writes under `~/.claude`. **Nothing leave
41
41
 
42
42
  ## Screenshots
43
43
 
44
- <p align="center"><img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/overview.jpg" width="900" alt="Overview: live sessions, KPIs, to-do list and completed items"></p>
44
+ <p align="center"><img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/overview.jpg" width="900" alt="Overview: Needs you (decisions, blockers, old waits, follow-ups to review) beside the live sessions, then handoffs from ended sessions and an activity feed"></p>
45
45
 
46
- | To-dos that fill themselves | One board for everything you still owe |
46
+ | A page for every session | New follow-ups wait for your review |
47
47
  |---|---|
48
- | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/todo.jpg" alt="To-do list grouped by project, with follow-ups picked up from sessions"> | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/board.jpg" alt="Kanban board with colour-coded columns: Decide, Outside work, Waiting on, Checklist, Later, Added by me, Done"> |
48
+ | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/session.jpg" alt="Session page: the session's summary as a handoff, the resume command, its tasks, token use and details"> | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/board.jpg" alt="Board by status: Detected (with Accept and Not useful), To do, Doing, On hold, Done and Archived columns"> |
49
49
 
50
- | Get better at Claude Code | Light theme |
50
+ | Analytics | Light theme |
51
51
  |---|---|
52
- | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/learn.jpg" alt="Suggestions based on your usage, with links to free official docs and courses"> | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/overview-light.jpg" alt="The overview in the light theme"> |
52
+ | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/analytics.jpg" alt="Analytics: totals, a 26-week activity heatmap, the last 30 days, tokens per day by model and active hours per day"> | <img src="https://raw.githubusercontent.com/vijayshuklaHL/sessionpulse/main/docs/images/overview-light.jpg" alt="The overview in the light theme"> |
53
53
 
54
54
  *All screenshots use made-up data (`tools/showcase/`).*
55
55
 
56
56
  ## Features
57
57
 
58
+ - **Needs you:** the Overview opens with what is waiting on you: open decisions, things you've waited on for more than 3 days, blockers named in each project's latest session summary, and new follow-ups to review.
59
+ - **Pick up where you left off:** a summary of each session (goal, done, open, blocked on, next step), on its own page with the resume command and the tasks it left.
58
60
  - **Live sessions:** working or idle, running time, last change, tokens, model. The panel icon shows the count and turns orange while Claude is working.
59
- - **Follow-ups (optional):** Claude reads each session after 20 quiet minutes and adds what was left open to your to-do list, linked back to the session, with a one-click resume command. A later session that finishes an item closes it automatically.
61
+ - **Follow-ups (optional):** Claude reads each session after 20 quiet minutes and adds what was left open to your to-do list, linked back to the session, with a one-click resume command. New items wait in **Detected** until you **Accept** them or mark them **Not useful**, which steers later reads. A later session that finishes an item closes it automatically.
60
62
  - **Why is this here?** Each follow-up keeps a short quote from the session, checked against the transcript; **Why?** shows it in context. The same work showing up in another project is flagged, with **Merge** and **Not the same**.
61
- - **Board:** every to-do as a card, colour-coded by kind (Decide, Outside work, Waiting on, Checklist, Later), or by status (To do, Doing, Done). Drag and drop, project filter, search.
63
+ - **Board:** every to-do as a card, colour-coded by kind (Decide, Outside work, Waiting on, Checklist, Later), or by status (Detected, To do, Doing, On hold, Done, Archived). Drag and drop, project filter, search, export to Markdown, CSV or JSON.
62
64
  - **Your own to-dos too:** add them on the dashboard or with `sessionpulse todo add "…"`.
63
- - **Usage:** input, output and cache tokens per day, split by model; active hours per day; busiest projects.
65
+ - **Analytics:** a 26-week activity heatmap, the last 30 days at a glance, input, output and cache tokens per day by model, active hours per day, busiest projects.
64
66
  - **Starts and exits:** when each session started and ended, and why (`/clear`, Ctrl+D, logout…).
65
- - **History:** every session, searchable, with a copyable `claude --resume` command.
67
+ - **Sessions:** every session, searchable; each opens its own page with a copyable `claude --resume` command.
66
68
  - **Get better at Claude Code:** suggestions picked from how you actually work (no `CLAUDE.md` in busy projects, very long sessions, features you haven't tried), with free official docs and Anthropic Academy courses.
67
- - **Small and private:** standard library only, listens on `127.0.0.1`, needs a token, works in light and dark mode and on a phone screen.
69
+ - **Small and private:** standard library only, listens on `127.0.0.1`, needs a token, dark and light themes, works on a phone screen (bottom tab bar).
68
70
 
69
71
  ## Install
70
72
 
@@ -181,6 +183,7 @@ followups_model = "haiku"
181
183
  followups_idle_minutes = 20
182
184
  followups_days = 30
183
185
  followups_parallel = 3
186
+ followups_review = true # new follow-ups wait in Detected until you accept them
184
187
  claude_command = "" # path to `claude` if it isn't on PATH
185
188
  ```
186
189
 
@@ -188,7 +191,7 @@ claude_command = "" # path to `claude` if it isn't on PATH
188
191
 
189
192
  Off by default, because it uses Claude. When on, the dashboard server checks every 5 minutes for sessions that have been quiet for 20 minutes and changed since it last read them. It sends their prompts and Claude's replies to `claude -p` (Haiku by default) and asks only for what's still open. That counts toward your Claude usage: roughly one small Haiku request per session.
190
193
 
191
- The request runs with all hooks disabled and `--no-session-persistence`, so it never shows up as a session, in this dashboard or in any hook of yours. Items you dismiss are remembered and not picked up again.
194
+ The request runs with all hooks disabled and `--no-session-persistence`, so it never shows up as a session, in this dashboard or in any hook of yours. New follow-ups wait in the board's **Detected** column until you **Accept** them or mark them **Not useful**; set `followups_review = false` to add them straight to the list. Items you dismiss are remembered and not picked up again.
192
195
 
193
196
  ## Privacy and security
194
197
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sessionpulse"
7
- version = "0.2.1"
7
+ version = "0.3.0"
8
8
  description = "A quiet instrument panel for Claude Code: live sessions, usage, and a to-do board that fills itself from your sessions. Local only."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,3 +1,3 @@
1
1
  """Session Pulse: a local dashboard and panel icon for Claude Code sessions."""
2
2
 
3
- __version__ = "0.2.0"
3
+ __version__ = "0.3.0"
@@ -179,7 +179,7 @@ def cmd_todo(cfg, args):
179
179
  try:
180
180
  if args.action == "add":
181
181
  todos.apply(cfg, {"op": "add", "text": " ".join(args.text), "project": args.project})
182
- elif args.action in ("done", "undo", "delete"):
182
+ elif args.action in ("done", "undo", "delete", "accept"):
183
183
  for i in args.text:
184
184
  todos.apply(cfg, {"op": args.action, "id": i})
185
185
  except ValueError as exc:
@@ -190,7 +190,8 @@ def cmd_todo(cfg, args):
190
190
  for i in show:
191
191
  tag = f" [{i['project']}]" if i.get("project") else ""
192
192
  when = f" done {i['done_at'][:10]}" if i["done_at"] else ""
193
- print(f"{i['id']} {i['text']}{tag}{when}")
193
+ review = " (to review)" if i.get("status") == todos.DETECTED else ""
194
+ print(f"{i['id']} {i['text']}{tag}{when}{review}")
194
195
  parked = [i for i in items if not i["done_at"] and i.get("status") in todos.STATUSES]
195
196
  if parked and args.action != "list-done":
196
197
  held = sum(i["status"] == "hold" for i in parked)
@@ -323,8 +324,8 @@ def main(argv=None):
323
324
  sub.add_parser("snapshot", help="print the dashboard data as JSON")
324
325
  t = sub.add_parser("todo", help="your to-do list: add, done, undo, delete, list, list-done, export")
325
326
  t.add_argument("action", nargs="?", default="list",
326
- choices=["list", "list-done", "add", "done", "undo", "delete", "export"])
327
- t.add_argument("text", nargs="*", help="the to-do text (add) or item ids (done/undo/delete)")
327
+ choices=["list", "list-done", "add", "done", "undo", "delete", "accept", "export"])
328
+ t.add_argument("text", nargs="*", help="the to-do text (add) or item ids (done/undo/delete/accept)")
328
329
  t.add_argument("-p", "--project", help="tag the new to-do with a project (export: only this project)")
329
330
  t.add_argument("--format", choices=todos.FORMATS, default="md", help="export: md (default), csv or json")
330
331
  t.add_argument("--status", choices=["open", "all"], default="open",
@@ -46,6 +46,7 @@ class Config:
46
46
  followups_every_minutes: int = 5
47
47
  followups_batch: int = 5 # sessions read per round
48
48
  followups_parallel: int = 3 # sessions read at the same time
49
+ followups_review: bool = True # new follow-ups wait in Detected until you accept them
49
50
  claude_command: str = "" # path to `claude`, if it isn't on PATH
50
51
 
51
52
  @property
@@ -273,6 +273,9 @@ def claude_bin(cfg):
273
273
  return None
274
274
 
275
275
 
276
+ NESTED_ENV = ("CLAUDECODE", "CLAUDE_CODE_ENTRYPOINT")
277
+
278
+
276
279
  def ask_claude(cfg, prompt, system=SYSTEM, schema=SCHEMA, usage=None):
277
280
  """Run `claude -p` and return its structured output. What the call used is added to the daily
278
281
  totals and, if given, to the `usage` dict."""
@@ -284,7 +287,9 @@ def ask_claude(cfg, prompt, system=SYSTEM, schema=SCHEMA, usage=None):
284
287
  cmd = [exe, "-p", "--model", cfg.followups_model, "--no-session-persistence", "--tools", "",
285
288
  "--settings", json.dumps({"disableAllHooks": True}), "--system-prompt", system,
286
289
  "--output-format", "json", "--json-schema", json.dumps(schema)]
287
- env = {**os.environ, "SESSIONPULSE_CHILD": "1"}
290
+ # Started from a terminal inside Claude Code, the tray inherits CLAUDECODE, and claude refuses to run
291
+ # "inside another session". This call is its own short-lived session, so drop those markers.
292
+ env = {k: v for k, v in os.environ.items() if k not in NESTED_ENV} | {"SESSIONPULSE_CHILD": "1"}
288
293
  r = subprocess.run(cmd, input=prompt, capture_output=True, text=True, cwd=work, env=env, timeout=TIMEOUT)
289
294
  try:
290
295
  out = json.loads(r.stdout)
@@ -17,7 +17,7 @@ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
17
17
  from importlib import resources
18
18
  from urllib.parse import parse_qs, urlparse
19
19
 
20
- from . import config, followups, reader, todos
20
+ from . import __version__, config, followups, reader, todos
21
21
 
22
22
  COOKIE = "sessionpulse"
23
23
 
@@ -87,6 +87,7 @@ def make_handler(cfg: config.Config, tok: str):
87
87
  "week": followups.usage_totals(cfg, 7), "failing": len(followups.failing(cfg))}
88
88
  ids = {s["id"] for s in data["sessions"]}
89
89
  data["briefs"] = {k: v for k, v in followups.load_briefs(cfg).items() if k in ids}
90
+ data["version"] = __version__
90
91
  return self.send(200, json.dumps(data).encode(), "application/json")
91
92
  if url.path == "/api/excerpt":
92
93
  return self.excerpt(parse_qs(url.query))