elliot-stack 1.0.29 → 1.0.33
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/LICENSE +21 -21
- package/README.md +5 -0
- package/bin/install.cjs +981 -950
- package/hooks/repo-search-nudge.js +32 -32
- package/package.json +1 -1
- package/skills/estack-active-learning-tutor/SKILL.md +339 -339
- package/skills/estack-better-title/SKILL.md +64 -64
- package/skills/estack-better-title/scripts/rename.sh +55 -55
- package/skills/estack-chris-voss/SKILL.md +80 -80
- package/skills/estack-chris-voss/references/elliot-notes.md +120 -120
- package/skills/estack-chris-voss/references/voss-principles.md +210 -210
- package/skills/estack-customer-discovery/SKILL.md +60 -60
- package/skills/estack-flight-planner/SKILL.md +332 -332
- package/skills/estack-flight-planner/references/config_schema.md +156 -156
- package/skills/estack-flight-planner/references/flight_history_schema.md +97 -97
- package/skills/estack-flight-planner/references/shuttle_schedules.md +98 -98
- package/skills/estack-flight-planner/scripts/check_setup.sh +89 -89
- package/skills/estack-flight-planner/scripts/fetch_flights.py +99 -99
- package/skills/estack-flight-planner/scripts/filter_flights.py +265 -265
- package/skills/estack-flight-planner/scripts/pair_shuttles.py +173 -173
- package/skills/estack-github-issue-tracker/SKILL.md +322 -322
- package/skills/estack-github-issue-tracker/bin/tracker-tools.cjs +1358 -1358
- package/skills/estack-github-issue-tracker/references/gh-cli-patterns.md +124 -124
- package/skills/estack-github-issue-tracker/references/result-file-schema.md +156 -156
- package/skills/estack-github-issue-tracker/references/tracker-schema.md +96 -96
- package/skills/estack-github-issue-tracker/tracker-template.md +58 -58
- package/skills/estack-leadership-coach/SKILL.md +235 -0
- package/skills/estack-leadership-coach/adding-references.md +280 -0
- package/skills/estack-leadership-coach/frameworks/delegation/flows/post-mortem.md +120 -0
- package/skills/estack-leadership-coach/frameworks/delegation/flows/pre-delegation.md +138 -0
- package/skills/estack-leadership-coach/frameworks/delegation/phases/1-intake.md +145 -0
- package/skills/estack-leadership-coach/frameworks/delegation/phases/2-trm-assessment.md +119 -0
- package/skills/estack-leadership-coach/frameworks/delegation/phases/3-enrollment.md +132 -0
- package/skills/estack-leadership-coach/frameworks/delegation/phases/4-build-brief.md +171 -0
- package/skills/estack-leadership-coach/frameworks/delegation/phases/5-monitoring.md +134 -0
- package/skills/estack-leadership-coach/frameworks/delegation/phases/6-reverse-delegation.md +118 -0
- package/skills/estack-leadership-coach/frameworks/delegation/phases/7-diagnose.md +200 -0
- package/skills/estack-leadership-coach/references/.source-files/deci-ryan_self-determination-theory__deci-olafsen-ryan-2017-self-determination-theory-in-work-organizations.md +1881 -0
- package/skills/estack-leadership-coach/references/.source-files/deci-ryan_self-determination-theory__gagne-deci-2005-self-determination-theory-and-work-motivation.md +2058 -0
- package/skills/estack-leadership-coach/references/.source-files/deci-ryan_self-determination-theory__selfdeterminationtheory-org-theory-overview-page.md +61 -0
- package/skills/estack-leadership-coach/references/.source-files/gallup_engagement-research__gallup-3-key-insights-into-the-global-workplace-2024.md +57 -0
- package/skills/estack-leadership-coach/references/.source-files/gallup_engagement-research__gallup-managers-account-for-70-percent-of-variance-in-employee-engagement-2015.md +40 -0
- package/skills/estack-leadership-coach/references/.source-files/gallup_engagement-research__gallup-state-of-the-global-workplace-2026-global-data-summary.md +73 -0
- package/skills/estack-leadership-coach/references/.source-files/gallup_engagement-research__gallup-state-of-the-global-workplace-2026-report-landing.md +42 -0
- package/skills/estack-leadership-coach/references/.source-files/hormozi-leila_4-stages__leila-hormozi-the-art-of-delegation-blog-post.md +91 -0
- package/skills/estack-leadership-coach/references/.source-files/oncken-wass_monkeys-hbr-1974__oncken-wass-management-time-whos-got-the-monkey-hbr-classic-1974.md +969 -0
- package/skills/estack-leadership-coach/references/.source-files/sanchez_main-street-millionaire__codie-sanchez-afford-anything-podcast-ep-565-show-notes.md +89 -0
- package/skills/estack-leadership-coach/references/.source-files/sullivan_who-not-how__dan-sullivan-impact-filter-tool-and-guide-booklet.md +565 -0
- package/skills/estack-leadership-coach/references/.source-files/van-edwards_cues__vanessa-van-edwards-lewis-howes-school-of-greatness-ep-1231-show-notes.md +122 -0
- package/skills/estack-leadership-coach/references/.source-files/van-edwards_cues__vanessa-van-edwards-roger-dooley-cues-interview.md +194 -0
- package/skills/estack-leadership-coach/references/deci-ryan_self-determination-theory.md +166 -0
- package/skills/estack-leadership-coach/references/doerr_measure-what-matters.md +154 -0
- package/skills/estack-leadership-coach/references/ferriss_4hww.md +189 -0
- package/skills/estack-leadership-coach/references/gallup_engagement-research.md +105 -0
- package/skills/estack-leadership-coach/references/gerber_e-myth-revisited.md +118 -0
- package/skills/estack-leadership-coach/references/grove_high-output-management.md +95 -0
- package/skills/estack-leadership-coach/references/hormozi-alex_followthrough.md +152 -0
- package/skills/estack-leadership-coach/references/hormozi-leila_4-stages.md +146 -0
- package/skills/estack-leadership-coach/references/oncken-wass_monkeys-hbr-1974.md +128 -0
- package/skills/estack-leadership-coach/references/sanchez_main-street-millionaire.md +196 -0
- package/skills/estack-leadership-coach/references/sullivan_who-not-how.md +137 -0
- package/skills/estack-leadership-coach/references/van-edwards_cues.md +189 -0
- package/skills/estack-migrate-claude-session-history/SKILL.md +226 -0
- package/skills/estack-migrate-claude-session-history/references/path-encoding.md +55 -0
- package/skills/estack-migrate-claude-session-history/references/troubleshooting.md +96 -0
- package/skills/estack-migrate-claude-session-history/scripts/migrate-claude-history.js +1123 -0
- package/skills/estack-migrate-claude-session-history/scripts/test-append-note.js +48 -0
- package/skills/estack-migrate-claude-session-history/scripts/test-validate-migration.py +326 -0
- package/skills/estack-migrate-claude-session-history/scripts/validate-migration.py +493 -0
- package/skills/estack-pdf-to-md/SKILL.md +180 -0
- package/skills/estack-pdf-to-md/scripts/pdf_to_md.py +596 -0
- package/skills/estack-productivity-prioritization-coach/SKILL.md +124 -0
- package/skills/estack-productivity-prioritization-coach/sources/01-tony-robbins-rpm.md +39 -0
- package/skills/estack-productivity-prioritization-coach/sources/02-justin-sung-task-prioritization.md +34 -0
- package/skills/estack-prompt-builder-coach/SKILL.md +81 -81
- package/skills/estack-prompt-builder-coach/definition-of-done-generator.md +42 -42
- package/skills/estack-prompt-builder-coach/prompt-builder.md +37 -37
- package/skills/estack-prompt-builder-coach/task-shaper.md +36 -36
- package/skills/estack-prompt-builder-coach/vague-ask-auditor.md +37 -37
- package/skills/estack-read-claude-session-history/SKILL.md +204 -204
- package/skills/estack-read-claude-session-history/references/jsonl-schema.md +126 -126
- package/skills/estack-read-claude-session-history/references/modes.md +423 -423
- package/skills/estack-read-claude-session-history/references/recipes.md +271 -271
- package/skills/estack-read-claude-session-history/scripts/lib/__init__.py +1 -1
- package/skills/estack-read-claude-session-history/scripts/lib/parser.py +460 -460
- package/skills/estack-read-claude-session-history/scripts/lib/paths.py +234 -234
- package/skills/estack-read-claude-session-history/scripts/lib/search.py +179 -179
- package/skills/estack-read-claude-session-history/scripts/lib/subagents.py +88 -88
- package/skills/estack-read-claude-session-history/scripts/lib/tools.py +144 -144
- package/skills/estack-read-claude-session-history/scripts/read_transcript.py +1776 -1776
- package/skills/estack-read-claude-session-history/scripts/tests/conftest.py +40 -40
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/README.md +20 -20
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/all-noise.jsonl +4 -4
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/basic-session.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-gaps.jsonl +9 -9
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-noise.jsonl +7 -7
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-parallel-a.jsonl +3 -3
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-parallel-b.jsonl +3 -3
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-waiting.jsonl +5 -5
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/interrupted.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/multi-compact.jsonl +8 -8
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/pending-user.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-no-meta/subagents/agent-aaa.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-no-meta.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-parent/subagents/agent-xyz123.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-parent/subagents/agent-xyz123.meta.json +1 -1
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-parent.jsonl +4 -4
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/time-spread.jsonl +6 -6
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/timeline-day-test.jsonl +5 -5
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/tool-zoo.jsonl +10 -10
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/truncated.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/unicode.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/with-advisor.jsonl +3 -3
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/with-compact.jsonl +5 -5
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/with-thinking.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/test_backup_roots.py +56 -56
- package/skills/estack-read-claude-session-history/scripts/tests/test_engagement.py +239 -239
- package/skills/estack-read-claude-session-history/scripts/tests/test_json_format.py +201 -201
- package/skills/estack-read-claude-session-history/scripts/tests/test_modes.py +199 -199
- package/skills/estack-read-claude-session-history/scripts/tests/test_parser.py +195 -195
- package/skills/estack-read-claude-session-history/scripts/tests/test_paths.py +133 -133
- package/skills/estack-read-claude-session-history/scripts/tests/test_search.py +78 -78
- package/skills/estack-read-claude-session-history/scripts/tests/test_subagents.py +43 -43
- package/skills/estack-read-claude-session-history/scripts/tests/test_timeline.py +179 -179
- package/skills/estack-read-claude-session-history/scripts/tests/test_timezone_and_project.py +212 -212
- package/skills/estack-read-claude-session-history/scripts/tests/test_tools.py +80 -80
- package/skills/estack-repo-search/SKILL.md +65 -65
- package/skills/estack-vscode-file-recovery/SKILL.md +188 -0
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
# JSONL schema reference
|
|
2
|
-
|
|
3
|
-
What's actually inside a Claude Code session `.jsonl`. Only relevant when extending the script or debugging an unexpected empty result.
|
|
4
|
-
|
|
5
|
-
## File location
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
C:\Users\<user>\.claude\projects\<encoded-cwd>\<session-uuid>.jsonl
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
The `<encoded-cwd>` is the original working directory with every `:`, `\`, `/`, and whitespace character replaced by `-`. Examples on this machine:
|
|
12
|
-
|
|
13
|
-
| Original CWD | Encoded directory |
|
|
14
|
-
|---|---|
|
|
15
|
-
| `C:\Users\2supe\Other Claude Code` | `C--Users-2supe-Other-Claude-Code` |
|
|
16
|
-
| `C:\Users\2supe\Other Claude Code\Personal Brand Project` | `C--Users-2supe-Other-Claude-Code-Personal-Brand-Project` |
|
|
17
|
-
| `C:\Users\2supe\AppData\Local\Temp` | `C--Users-2supe-AppData-Local-Temp` |
|
|
18
|
-
|
|
19
|
-
The encoding is lossy — single hyphens in the original path collapse into the same hyphens that separate segments. Use `--mode lookup` / `--mode find` to recover the actual session path; `decode_project_name()` produces a display-only approximation.
|
|
20
|
-
|
|
21
|
-
## Backup roots
|
|
22
|
-
|
|
23
|
-
The same encoded-directory layout exists under each `.claude-backups\<name>\projects\` root:
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
C:\Users\2supe\.claude-backups\
|
|
27
|
-
├── mirror\projects\<encoded-cwd>\<uuid>.jsonl
|
|
28
|
-
├── snapshot-24h\projects\<encoded-cwd>\<uuid>.jsonl
|
|
29
|
-
├── snapshot-1w\projects\<encoded-cwd>\<uuid>.jsonl
|
|
30
|
-
└── snapshot-1mo\projects\<encoded-cwd>\<uuid>.jsonl
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
`--root mirror|snapshot-24h|snapshot-1w|snapshot-1mo` rebases all path resolution to that snapshot. An absolute path argument is also accepted.
|
|
34
|
-
|
|
35
|
-
## Subagent transcripts
|
|
36
|
-
|
|
37
|
-
When a session spawns subagents (via the `Agent` / `Task` tool), each subagent's own transcript is written to:
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
<project-dir>\<session-uuid>\subagents\agent-<id>.jsonl
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
A sidecar metadata file lives next to it:
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
<project-dir>\<session-uuid>\subagents\agent-<id>.meta.json
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
The meta file contains:
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
{
|
|
53
|
-
"agentType": "Explore",
|
|
54
|
-
"description": "Find every reference to X"
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
When the meta file is missing, `subagents.load_meta` returns `{"agentType": "unknown", "description": ""}`.
|
|
59
|
-
|
|
60
|
-
Subagent entries inside the parent transcript are marked with `isSidechain: true` and carry an `agentId` field.
|
|
61
|
-
|
|
62
|
-
## Entry types
|
|
63
|
-
|
|
64
|
-
Each line in a `.jsonl` is a JSON object with a `type` field. Entry classifications:
|
|
65
|
-
|
|
66
|
-
| `type` value | Classification | Notes |
|
|
67
|
-
|---|---|---|
|
|
68
|
-
| `user` | signal (user) | `message.content` may be string or array. Compact markers live here. |
|
|
69
|
-
| `assistant` | signal (assistant) | `message.content` is always an array of blocks. |
|
|
70
|
-
| `ai-title` / `custom-title` | title | `aiTitle` / `customTitle` field carries the session title. |
|
|
71
|
-
| `permission-mode` | noise | mode change events |
|
|
72
|
-
| `attachment` | noise | file attachments |
|
|
73
|
-
| `last-prompt` | noise | cached last prompt |
|
|
74
|
-
| `queue-operation` | noise | internal queueing |
|
|
75
|
-
| `file-history-snapshot` | noise | file state snapshots |
|
|
76
|
-
| `system` | noise | system events |
|
|
77
|
-
| `agent-name` | noise | agent name metadata |
|
|
78
|
-
| `pr-link` | noise | PR linkage |
|
|
79
|
-
|
|
80
|
-
The `noise` and `title` entries are skipped by `get_messages()`. `debug` mode prints the full distribution.
|
|
81
|
-
|
|
82
|
-
## Assistant content block types
|
|
83
|
-
|
|
84
|
-
The `message.content` array for assistant entries can hold:
|
|
85
|
-
|
|
86
|
-
| Block `type` | Field of interest | Meaning |
|
|
87
|
-
|---|---|---|
|
|
88
|
-
| `text` | `text` | The actual assistant text output. |
|
|
89
|
-
| `thinking` | `thinking` (or `text`) | Model internal reasoning. |
|
|
90
|
-
| `tool_use` | `name`, `input`, `id` | A regular tool call. `id` is the matching id for any later `tool_result`. |
|
|
91
|
-
| `server_tool_use` | `name`, `input` | Server-side tool call (e.g., advisor invocation). |
|
|
92
|
-
| `advisor_tool_result` | `content.text` | The advisor's reply. Always nested as `block.content.text`. |
|
|
93
|
-
| `tool_result` | `tool_use_id`, `content` | Result for a prior `tool_use`. `content` is a string or an array of `{type:"text", text:"..."}`. |
|
|
94
|
-
|
|
95
|
-
## Compact marker
|
|
96
|
-
|
|
97
|
-
A `/compact` event appears as a `type:"user"` entry whose first text content starts with:
|
|
98
|
-
|
|
99
|
-
> `"This session is being continued from a previous conversation"`
|
|
100
|
-
|
|
101
|
-
`classify_entry` returns `"compact"` for these. Everything before the most-recent compact marker is the pre-compact conversation.
|
|
102
|
-
|
|
103
|
-
## Timestamps
|
|
104
|
-
|
|
105
|
-
Most entries carry a `timestamp` field in ISO-8601 form (`2026-05-01T10:00:05Z`). `_parse_timestamp` accepts ISO strings, naive ISO, and numeric epoch values. Timezone-aware values are stripped for comparison with `--since`/`--until` (which use local naive datetimes).
|
|
106
|
-
|
|
107
|
-
## Title entries
|
|
108
|
-
|
|
109
|
-
Both `ai-title` and `custom-title` entries surface a `aiTitle` / `customTitle` string. `session_summary()` prefers `aiTitle` when both are present.
|
|
110
|
-
|
|
111
|
-
## Truncation behavior
|
|
112
|
-
|
|
113
|
-
`iter_lines` drops the final line if it lacks a trailing newline AND fails to parse as JSON, printing `[note: dropped truncated trailing line in <name>]` to stderr. Malformed mid-file lines are dropped silently.
|
|
114
|
-
|
|
115
|
-
## Status inference
|
|
116
|
-
|
|
117
|
-
`infer_status(lines, mtime, current_session_id, session_uuid)` returns one of:
|
|
118
|
-
|
|
119
|
-
| Status | Glyph | Heuristic |
|
|
120
|
-
|---|---|---|
|
|
121
|
-
| `active` | ● | `current_session_id == session_uuid` AND `mtime` within 5 minutes |
|
|
122
|
-
| `interrupted` | ! | Any `tool_use` block lacks a paired `tool_result` |
|
|
123
|
-
| `pending-user` | ? | Last assistant text message ends with `?` |
|
|
124
|
-
| `clean` | ✓ | none of the above |
|
|
125
|
-
|
|
126
|
-
This is heuristic — it's correct for the majority of real sessions on this machine but can be fooled by, e.g., an assistant message that legitimately ends with a question.
|
|
1
|
+
# JSONL schema reference
|
|
2
|
+
|
|
3
|
+
What's actually inside a Claude Code session `.jsonl`. Only relevant when extending the script or debugging an unexpected empty result.
|
|
4
|
+
|
|
5
|
+
## File location
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
C:\Users\<user>\.claude\projects\<encoded-cwd>\<session-uuid>.jsonl
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The `<encoded-cwd>` is the original working directory with every `:`, `\`, `/`, and whitespace character replaced by `-`. Examples on this machine:
|
|
12
|
+
|
|
13
|
+
| Original CWD | Encoded directory |
|
|
14
|
+
|---|---|
|
|
15
|
+
| `C:\Users\2supe\Other Claude Code` | `C--Users-2supe-Other-Claude-Code` |
|
|
16
|
+
| `C:\Users\2supe\Other Claude Code\Personal Brand Project` | `C--Users-2supe-Other-Claude-Code-Personal-Brand-Project` |
|
|
17
|
+
| `C:\Users\2supe\AppData\Local\Temp` | `C--Users-2supe-AppData-Local-Temp` |
|
|
18
|
+
|
|
19
|
+
The encoding is lossy — single hyphens in the original path collapse into the same hyphens that separate segments. Use `--mode lookup` / `--mode find` to recover the actual session path; `decode_project_name()` produces a display-only approximation.
|
|
20
|
+
|
|
21
|
+
## Backup roots
|
|
22
|
+
|
|
23
|
+
The same encoded-directory layout exists under each `.claude-backups\<name>\projects\` root:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
C:\Users\2supe\.claude-backups\
|
|
27
|
+
├── mirror\projects\<encoded-cwd>\<uuid>.jsonl
|
|
28
|
+
├── snapshot-24h\projects\<encoded-cwd>\<uuid>.jsonl
|
|
29
|
+
├── snapshot-1w\projects\<encoded-cwd>\<uuid>.jsonl
|
|
30
|
+
└── snapshot-1mo\projects\<encoded-cwd>\<uuid>.jsonl
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`--root mirror|snapshot-24h|snapshot-1w|snapshot-1mo` rebases all path resolution to that snapshot. An absolute path argument is also accepted.
|
|
34
|
+
|
|
35
|
+
## Subagent transcripts
|
|
36
|
+
|
|
37
|
+
When a session spawns subagents (via the `Agent` / `Task` tool), each subagent's own transcript is written to:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
<project-dir>\<session-uuid>\subagents\agent-<id>.jsonl
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
A sidecar metadata file lives next to it:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
<project-dir>\<session-uuid>\subagents\agent-<id>.meta.json
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The meta file contains:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"agentType": "Explore",
|
|
54
|
+
"description": "Find every reference to X"
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
When the meta file is missing, `subagents.load_meta` returns `{"agentType": "unknown", "description": ""}`.
|
|
59
|
+
|
|
60
|
+
Subagent entries inside the parent transcript are marked with `isSidechain: true` and carry an `agentId` field.
|
|
61
|
+
|
|
62
|
+
## Entry types
|
|
63
|
+
|
|
64
|
+
Each line in a `.jsonl` is a JSON object with a `type` field. Entry classifications:
|
|
65
|
+
|
|
66
|
+
| `type` value | Classification | Notes |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| `user` | signal (user) | `message.content` may be string or array. Compact markers live here. |
|
|
69
|
+
| `assistant` | signal (assistant) | `message.content` is always an array of blocks. |
|
|
70
|
+
| `ai-title` / `custom-title` | title | `aiTitle` / `customTitle` field carries the session title. |
|
|
71
|
+
| `permission-mode` | noise | mode change events |
|
|
72
|
+
| `attachment` | noise | file attachments |
|
|
73
|
+
| `last-prompt` | noise | cached last prompt |
|
|
74
|
+
| `queue-operation` | noise | internal queueing |
|
|
75
|
+
| `file-history-snapshot` | noise | file state snapshots |
|
|
76
|
+
| `system` | noise | system events |
|
|
77
|
+
| `agent-name` | noise | agent name metadata |
|
|
78
|
+
| `pr-link` | noise | PR linkage |
|
|
79
|
+
|
|
80
|
+
The `noise` and `title` entries are skipped by `get_messages()`. `debug` mode prints the full distribution.
|
|
81
|
+
|
|
82
|
+
## Assistant content block types
|
|
83
|
+
|
|
84
|
+
The `message.content` array for assistant entries can hold:
|
|
85
|
+
|
|
86
|
+
| Block `type` | Field of interest | Meaning |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| `text` | `text` | The actual assistant text output. |
|
|
89
|
+
| `thinking` | `thinking` (or `text`) | Model internal reasoning. |
|
|
90
|
+
| `tool_use` | `name`, `input`, `id` | A regular tool call. `id` is the matching id for any later `tool_result`. |
|
|
91
|
+
| `server_tool_use` | `name`, `input` | Server-side tool call (e.g., advisor invocation). |
|
|
92
|
+
| `advisor_tool_result` | `content.text` | The advisor's reply. Always nested as `block.content.text`. |
|
|
93
|
+
| `tool_result` | `tool_use_id`, `content` | Result for a prior `tool_use`. `content` is a string or an array of `{type:"text", text:"..."}`. |
|
|
94
|
+
|
|
95
|
+
## Compact marker
|
|
96
|
+
|
|
97
|
+
A `/compact` event appears as a `type:"user"` entry whose first text content starts with:
|
|
98
|
+
|
|
99
|
+
> `"This session is being continued from a previous conversation"`
|
|
100
|
+
|
|
101
|
+
`classify_entry` returns `"compact"` for these. Everything before the most-recent compact marker is the pre-compact conversation.
|
|
102
|
+
|
|
103
|
+
## Timestamps
|
|
104
|
+
|
|
105
|
+
Most entries carry a `timestamp` field in ISO-8601 form (`2026-05-01T10:00:05Z`). `_parse_timestamp` accepts ISO strings, naive ISO, and numeric epoch values. Timezone-aware values are stripped for comparison with `--since`/`--until` (which use local naive datetimes).
|
|
106
|
+
|
|
107
|
+
## Title entries
|
|
108
|
+
|
|
109
|
+
Both `ai-title` and `custom-title` entries surface a `aiTitle` / `customTitle` string. `session_summary()` prefers `aiTitle` when both are present.
|
|
110
|
+
|
|
111
|
+
## Truncation behavior
|
|
112
|
+
|
|
113
|
+
`iter_lines` drops the final line if it lacks a trailing newline AND fails to parse as JSON, printing `[note: dropped truncated trailing line in <name>]` to stderr. Malformed mid-file lines are dropped silently.
|
|
114
|
+
|
|
115
|
+
## Status inference
|
|
116
|
+
|
|
117
|
+
`infer_status(lines, mtime, current_session_id, session_uuid)` returns one of:
|
|
118
|
+
|
|
119
|
+
| Status | Glyph | Heuristic |
|
|
120
|
+
|---|---|---|
|
|
121
|
+
| `active` | ● | `current_session_id == session_uuid` AND `mtime` within 5 minutes |
|
|
122
|
+
| `interrupted` | ! | Any `tool_use` block lacks a paired `tool_result` |
|
|
123
|
+
| `pending-user` | ? | Last assistant text message ends with `?` |
|
|
124
|
+
| `clean` | ✓ | none of the above |
|
|
125
|
+
|
|
126
|
+
This is heuristic — it's correct for the majority of real sessions on this machine but can be fooled by, e.g., an assistant message that legitimately ends with a question.
|