agent-timelines 0.2.0__py3-none-any.whl

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.
@@ -0,0 +1,153 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-timelines
3
+ Version: 0.2.0
4
+ Summary: Live delegation graph of Claude Code sessions and their subagents
5
+ Author: jasondasuki
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/jasondasuki/agent-timelines
8
+ Project-URL: Source, https://github.com/jasondasuki/agent-timelines
9
+ Project-URL: Issues, https://github.com/jasondasuki/agent-timelines/issues
10
+ Keywords: claude-code,claude,agents,subagents,dashboard,observability,pixel-art
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Operating System :: MacOS
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Environment :: Console
20
+ Classifier: Intended Audience :: Developers
21
+ Classifier: Topic :: Software Development :: Debuggers
22
+ Requires-Python: >=3.9
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ License-File: src/agent_timelines/assets/LICENSES.txt
26
+ Dynamic: license-file
27
+
28
+ # agent-timelines
29
+
30
+ [![CI](https://github.com/jasondasuki/agent-timelines/actions/workflows/ci.yml/badge.svg)](https://github.com/jasondasuki/agent-timelines/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jasondasuki/agent-timelines/blob/main/LICENSE)
31
+
32
+ A pixel-art dashboard for Claude Code sessions. It shows which agent spawned which, the model and effort
33
+ requested vs. what actually ran, tool calls, weighted token cost and dollars, handoffs and Workflow runs, live while the
34
+ session works. Everything is read from your local transcripts; nothing leaves your machine.
35
+
36
+ ![Chart view: the delegation tree as a party of heroes, with one hero's detail panel open](https://raw.githubusercontent.com/jasondasuki/agent-timelines/main/docs/chart.jpg)
37
+
38
+ - **Lobby**: your 200 most recent sessions as a retro game-server list (live dungeons + hall of records), with search, a project filter and
39
+ paging (`/` focuses the search box, left/right change the page).
40
+ - **Chart view**: the delegation tree as a party of heroes, with flags for rule breaks (no model set,
41
+ model mismatch, ignored tool limit, unanswered handoff, …).
42
+ Each card shows the agent's top tools and the start of its final reply; the detail panel lists every tool and the full report
43
+ (a running agent shows what it is saying now).
44
+ - **Timeline view**: one bar per agent on a shared clock, rows in party-tree order, so you can see who ran when and what overlapped.
45
+ Running agents get a striped bar; zoom with + and -.
46
+ - **Map view**: the same session as a procedurally generated dungeon. The main session is the guild master
47
+ in the guild hall; each agent has its own room and fights an enemy while it works, then celebrates.
48
+
49
+ ![Lobby: live dungeons and the hall of records](https://raw.githubusercontent.com/jasondasuki/agent-timelines/main/docs/lobby.jpg)
50
+ ![Map view: a procedurally generated dungeon with one room per agent](https://raw.githubusercontent.com/jasondasuki/agent-timelines/main/docs/map.jpg)
51
+
52
+ (The screenshots show a synthetic demo session.)
53
+
54
+ ## Install
55
+
56
+ Needs Python 3.9+ on macOS or Linux (Windows is not supported). No other dependencies. Use one of the two options, not both.
57
+
58
+ **Option A: the command-line tool from PyPI** (needs [uv](https://docs.astral.sh/uv/) or pipx)
59
+
60
+ ```sh
61
+ uv tool install agent-timelines # or: pipx install agent-timelines
62
+ agent-timelines install # adds 6 hooks to ~/.claude/settings.json (writes a backup next to it first)
63
+ agent-timelines rebuild # optional: fills the lobby with your sessions from the last 30 days
64
+ agent-timelines serve # opens http://127.0.0.1:8765/index.html (localhost only)
65
+ ```
66
+
67
+ **Option B: the Claude Code plugin** (no pip, no settings.json edit; the hooks come with the plugin)
68
+
69
+ ```sh
70
+ claude plugin marketplace add jasondasuki/agent-timelines
71
+ claude plugin install agent-timelines@agent-timelines
72
+ ```
73
+
74
+ Then ask for the dashboard with `/agent-timelines:dashboard`. The plugin's hooks run `python3` from your PATH, so Python 3.9+ must be there.
75
+ If `agent-timelines install` hooks are also in settings.json, the plugin's hooks stay quiet so nothing is built twice.
76
+
77
+ Start or continue a Claude Code session; it appears in the lobby on its first hook event.
78
+
79
+ | Command | What it does |
80
+ |---|---|
81
+ | `install [--settings PATH]` | Add the hooks (replaces earlier agent-timelines hooks, keeps all others). |
82
+ | `uninstall [--settings PATH]` | Remove the hooks. Your data folder stays. |
83
+ | `serve [--port N] [--no-browser]` | Serve the dashboard on 127.0.0.1. |
84
+ | `open [SESSION-PREFIX]` | Build one session (newest by default) and open it from disk, no server. |
85
+ | `rebuild [--days N]` | Regenerate data for recent sessions from their transcripts. |
86
+ | `list` | Recent sessions with their subagent counts. |
87
+
88
+ `--settings` targets another Claude config dir, e.g. `--settings ~/.claude-work/settings.json`.
89
+ `CLAUDE_CONFIG_DIR` is respected for the default paths.
90
+
91
+ Data lives in `~/.claude/agent-timelines/` (one `<session>.data.js` and one `<session>.prompts.js` per session, removed after 30 days untouched).
92
+ The pages hold prompt text from your sessions, which is why `serve` binds to localhost only and refuses requests that come from other sites (wrong `Host`, or a cross-site script or fetch).
93
+
94
+ ## Config (optional)
95
+
96
+ `~/.config/agent-timelines/config.json` (or `$AGENT_TIMELINES_CONFIG`). Every key is optional:
97
+
98
+ ```json
99
+ {
100
+ "out_dir": "~/.claude/agent-timelines",
101
+ "ctx_limit": 200000,
102
+ "tool_limit": 50,
103
+ "brief_limit": 8000,
104
+ "retain_days": 30,
105
+ "lobby_limit": 200,
106
+ "handover_dir": "~/.claude/handovers",
107
+ "agents_dir": "~/.claude/agents",
108
+ "guard_text": "Main session does not execute",
109
+ "tiers": {"Explore": "scanner", "Plan": "plan", "general-purpose": "executor"},
110
+ "rules": {"no-model": true, "no-effort": true},
111
+ "prices": {"gpt-6": {"in": 1, "out": 2}}
112
+ }
113
+ ```
114
+
115
+ `tool_limit` is unset by default, so there are no hearts, only a tool count; set it to the number your hand-off hook uses.
116
+ `brief_limit`, `guard_text` and `handover_dir` match optional hand-off and guard hooks of your own;
117
+ without such hooks those flags never fire. `tiers` maps agent types to character classes.
118
+ `rules` turns single flags on or off by name; a flag you do not list keeps its default. `no-model` and `no-effort` are off by default;
119
+ turn them on if your setup requires every spawn to name a model and effort. The flag names are `no-model`, `no-effort`, `auto-filled`,
120
+ `frontmatter`, `model-mismatch`, `effort-mismatch`, `ctx` (the context-size flag), `handoff`, `tool-limit`, `ignored-limit`, `orphan`
121
+ and `handoff-not-continued`; an unknown name is an error.
122
+
123
+ `prices` adds or changes entries of the built-in price table (USD per million tokens; the table is dated, see `PRICES_ASOF` in `timeline.py`).
124
+ The key is a model id prefix without `claude-`, the longest matching key wins, and the columns are `in`, `cc5` (5-minute cache write),
125
+ `cc1` (1-hour cache write), `cr` (cache read), `out` and an optional `over` (`[prompt tokens, multiplier]`); a missing column counts as 0.
126
+ Entries are merged per model, so you only list what you add or change. A model with no price is shown as unpriced (`$0.00+` on its card),
127
+ never guessed.
128
+
129
+ ### Cost
130
+
131
+ Cost is computed per message from the full model id and the usage recorded in the transcript, at Anthropic first-party API list prices
132
+ ([pricing page](https://platform.claude.com/docs/en/about-claude/pricing), table dated 2026-11-10). It is what those tokens would cost through the
133
+ API; a subscription plan is not billed per token. Not modelled: the 1.1x US-only `inference_geo` surcharge (the transcript does not say whether it
134
+ applied), batch discounts, Bedrock and Vertex prices, web-search and other server-tool fees. Gold is the same tokens weighted by cost, as before.
135
+
136
+ ## Development
137
+
138
+ ```sh
139
+ python3 tests/test_timeline.py && python3 tests/test_cli.py # Python
140
+ node tests/test_dungeon.js && node tests/test_actors.js && node tests/test_lobby.js && node tests/test_gantt.js # viewer scripts (Node 18+)
141
+ open dev/dungeon-demo.html # dungeon playground: agents, working, reset
142
+ ```
143
+
144
+ ## Credits
145
+
146
+ - Sprites: [Kenney](https://www.kenney.nl) "Tiny Dungeon" and "1-Bit Pack", CC0.
147
+ - Font: Press Start 2P by CodeMan38, SIL Open Font License 1.1.
148
+
149
+ Details in `src/agent_timelines/assets/LICENSES.txt`.
150
+
151
+ ## License
152
+
153
+ MIT, see [LICENSE](https://github.com/jasondasuki/agent-timelines/blob/main/LICENSE). Contributions welcome: see [CONTRIBUTING.md](https://github.com/jasondasuki/agent-timelines/blob/main/CONTRIBUTING.md). Security reports: [SECURITY.md](https://github.com/jasondasuki/agent-timelines/blob/main/SECURITY.md).
@@ -0,0 +1,20 @@
1
+ agent_timelines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ agent_timelines/__main__.py,sha256=bYt9eEaoRQWdejEHFD8REx9jxVEdZptECFsV7F49Ink,30
3
+ agent_timelines/actors.js,sha256=vzlvvAFU2X-YAGIpMUrvQIQLm9d3fXTZTD4buk6E5Io,12264
4
+ agent_timelines/cli.py,sha256=hPj9pSOaQ9AO3bMzFsPIIRQJP_rG06qT06-f7WUWgfg,9586
5
+ agent_timelines/dungeon.js,sha256=sKQNcYq34ei3qpDQPFQq39hCtgDC7mvdXV1o0IJIB5M,12520
6
+ agent_timelines/gantt.js,sha256=MikACV4fPA5q2wkE0jsscm5VePLdJFltZqgHGd3wYOM,3689
7
+ agent_timelines/lobby.js,sha256=Q6PweYBbQzkBG2obvn5m55hcIvby7teBqwRLc81oNVE,2426
8
+ agent_timelines/timeline.py,sha256=VUVVoRcqQPbO-DquiEoUe1sucZygyTXK6GbGTElO8fI,34919
9
+ agent_timelines/viewer.html,sha256=rQDYVbhJvDjvP8irIJ_TQQK-9AkVqFlTXsLN0XZSKVs,52156
10
+ agent_timelines/assets/LICENSES.txt,sha256=H5CEDrbMPZDQqy_bIArZsH2OiEqI7mR-SVZZJ5iEx8g,4840
11
+ agent_timelines/assets/PressStart2P-Regular.ttf,sha256=A0x38fBeyJQh5KY_DjpMoez4UsxtK_YR8SbydXKOAX0,118204
12
+ agent_timelines/assets/one-bit.png,sha256=V4jwqdZUnGuzRwqVOOvs90tflKa4Wttd227W0lRIUiA,22927
13
+ agent_timelines/assets/tiny-dungeon.png,sha256=0k5gpB5Kx6dFwDBN_eEhFDaIVX9AIV8jIhwpz-aDgl8,5294
14
+ agent_timelines-0.2.0.dist-info/licenses/LICENSE,sha256=5PexdM_uPCCd4H9o75lr4ZVoo76-Jf3K1o0pJCeI5MU,1185
15
+ agent_timelines-0.2.0.dist-info/licenses/src/agent_timelines/assets/LICENSES.txt,sha256=H5CEDrbMPZDQqy_bIArZsH2OiEqI7mR-SVZZJ5iEx8g,4840
16
+ agent_timelines-0.2.0.dist-info/METADATA,sha256=C5huIyc40mIMCNY87UO18bYmCyikZjDNWJfJARl2_bo,8859
17
+ agent_timelines-0.2.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
18
+ agent_timelines-0.2.0.dist-info/entry_points.txt,sha256=rSO9x3YWtgDzy-Dd5MHOxLkCIty08NkBW8kw-NkxVbQ,61
19
+ agent_timelines-0.2.0.dist-info/top_level.txt,sha256=FXiuVJ4xhuD50j6flgk8iOOKvWdafikTpJBMMUFnV5Q,16
20
+ agent_timelines-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ agent-timelines = agent_timelines.cli:main
@@ -0,0 +1,24 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 jasondasuki
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ Bundled third-party assets (sprites and font) keep their own licenses:
24
+ see src/agent_timelines/assets/LICENSES.txt.
@@ -0,0 +1,98 @@
1
+ tiny-dungeon.png Kenney "Tiny Dungeon" 1.0 (www.kenney.nl), CC0 1.0. Source: https://opengameart.org/content/tiny-dungeon
2
+ one-bit.png Kenney "1-Bit Pack" 1.1 (www.kenney.nl), CC0 1.0. Source: https://opengameart.org/content/1-bit-pack
3
+ PressStart2P-Regular.ttf Copyright 2012 The Press Start 2P Project Authors, SIL Open Font License 1.1 (text below).
4
+ Source: https://github.com/google/fonts/tree/main/ofl/pressstart2p
5
+
6
+ Copyright 2012 The Press Start 2P Project Authors (cody@zone38.net), with Reserved Font Name "Press Start 2P".
7
+
8
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
9
+ This license is copied below, and is also available with a FAQ at:
10
+ http://scripts.sil.org/OFL
11
+
12
+
13
+ -----------------------------------------------------------
14
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
15
+ -----------------------------------------------------------
16
+
17
+ PREAMBLE
18
+ The goals of the Open Font License (OFL) are to stimulate worldwide
19
+ development of collaborative font projects, to support the font creation
20
+ efforts of academic and linguistic communities, and to provide a free and
21
+ open framework in which fonts may be shared and improved in partnership
22
+ with others.
23
+
24
+ The OFL allows the licensed fonts to be used, studied, modified and
25
+ redistributed freely as long as they are not sold by themselves. The
26
+ fonts, including any derivative works, can be bundled, embedded,
27
+ redistributed and/or sold with any software provided that any reserved
28
+ names are not used by derivative works. The fonts and derivatives,
29
+ however, cannot be released under any other type of license. The
30
+ requirement for fonts to remain under this license does not apply
31
+ to any document created using the fonts or their derivatives.
32
+
33
+ DEFINITIONS
34
+ "Font Software" refers to the set of files released by the Copyright
35
+ Holder(s) under this license and clearly marked as such. This may
36
+ include source files, build scripts and documentation.
37
+
38
+ "Reserved Font Name" refers to any names specified as such after the
39
+ copyright statement(s).
40
+
41
+ "Original Version" refers to the collection of Font Software components as
42
+ distributed by the Copyright Holder(s).
43
+
44
+ "Modified Version" refers to any derivative made by adding to, deleting,
45
+ or substituting -- in part or in whole -- any of the components of the
46
+ Original Version, by changing formats or by porting the Font Software to a
47
+ new environment.
48
+
49
+ "Author" refers to any designer, engineer, programmer, technical
50
+ writer or other person who contributed to the Font Software.
51
+
52
+ PERMISSION & CONDITIONS
53
+ Permission is hereby granted, free of charge, to any person obtaining
54
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
55
+ redistribute, and sell modified and unmodified copies of the Font
56
+ Software, subject to the following conditions:
57
+
58
+ 1) Neither the Font Software nor any of its individual components,
59
+ in Original or Modified Versions, may be sold by itself.
60
+
61
+ 2) Original or Modified Versions of the Font Software may be bundled,
62
+ redistributed and/or sold with any software, provided that each copy
63
+ contains the above copyright notice and this license. These can be
64
+ included either as stand-alone text files, human-readable headers or
65
+ in the appropriate machine-readable metadata fields within text or
66
+ binary files as long as those fields can be easily viewed by the user.
67
+
68
+ 3) No Modified Version of the Font Software may use the Reserved Font
69
+ Name(s) unless explicit written permission is granted by the corresponding
70
+ Copyright Holder. This restriction only applies to the primary font name as
71
+ presented to the users.
72
+
73
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
74
+ Software shall not be used to promote, endorse or advertise any
75
+ Modified Version, except to acknowledge the contribution(s) of the
76
+ Copyright Holder(s) and the Author(s) or with their explicit written
77
+ permission.
78
+
79
+ 5) The Font Software, modified or unmodified, in part or in whole,
80
+ must be distributed entirely under this license, and must not be
81
+ distributed under any other license. The requirement for fonts to
82
+ remain under this license does not apply to any document created
83
+ using the Font Software.
84
+
85
+ TERMINATION
86
+ This license becomes null and void if any of the above conditions are
87
+ not met.
88
+
89
+ DISCLAIMER
90
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
91
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
92
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
93
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
94
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
95
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
96
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
97
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
98
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1 @@
1
+ agent_timelines