@brandry/claude-jsonl-compressor 1.0.0 → 1.1.0
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/CHANGELOG.md +73 -56
- package/LICENSE +674 -674
- package/NOTICE +8 -8
- package/README.md +666 -611
- package/SKILL.md +230 -345
- package/agents/openai.yaml +7 -7
- package/bin/claude-jsonl-compressor.cjs +4 -4
- package/bin/claude-jsonl-repair-read-pages.cjs +4 -4
- package/bin/run-python.cjs +77 -77
- package/package.json +60 -60
- package/references/claude-jsonl-compression-format.md +635 -578
- package/scripts/claude_session_tools.py +304 -245
- package/scripts/compress_claude_jsonl.py +8608 -8275
- package/scripts/repair_claude_jsonl.py +627 -627
- package/templates/summary_template_en.md +78 -78
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
# Codex Offline Compression Summary
|
|
2
|
-
|
|
3
|
-
This is a candidate Claude Code JSONL compact summary generated outside Claude. It summarizes only older records from the selected active chain. Rewound, inactive, and unattributed records are excluded.
|
|
4
|
-
|
|
5
|
-
## 1. Scope
|
|
6
|
-
|
|
7
|
-
- Source file label: {input_path}
|
|
8
|
-
- Original record count: {total_records}
|
|
9
|
-
- Active-chain records selected for summary: {omitted_record_count} records before the preserved active-chain window
|
|
10
|
-
- Recent raw active-chain records preserved: {recent_record_count} records
|
|
11
|
-
- Physical line window of preserved records: {recent_start} to {recent_end}
|
|
12
|
-
- Time span summarized: {first_ts} to {last_omitted_ts}
|
|
13
|
-
- Time span preserved: {first_kept_ts} to {last_kept_ts}
|
|
14
|
-
- Session distribution: {session_counts}
|
|
15
|
-
- Common working directories: {cwd_counts}
|
|
16
|
-
- Claude Code versions: {version_counts}
|
|
17
|
-
|
|
18
|
-
## 2. Structural Overview
|
|
19
|
-
|
|
20
|
-
- Record types: {type_counts}
|
|
21
|
-
- System subtypes: {subtype_counts}
|
|
22
|
-
- Tool invocation overview: {tool_counts}
|
|
23
|
-
- Attachment / hook overview: {attachment_counts}
|
|
24
|
-
- File history snapshots: {file_history_count}
|
|
25
|
-
- Existing compact summaries summarized into this layer: {existing_compact_count}
|
|
26
|
-
- Human user prompts: {human_user_count}
|
|
27
|
-
- Tool-result user records: {tool_result_user_count}
|
|
28
|
-
|
|
29
|
-
## 3. Long-Term Memory Ledger
|
|
30
|
-
|
|
31
|
-
{long_term_memory}
|
|
32
|
-
|
|
33
|
-
## 4. Early / Middle Summary
|
|
34
|
-
|
|
35
|
-
### 4.1 Early
|
|
36
|
-
{early_summary}
|
|
37
|
-
|
|
38
|
-
### 4.2 Middle
|
|
39
|
-
{middle_summary}
|
|
40
|
-
|
|
41
|
-
## 5. Assistant Behavior and Evidence
|
|
42
|
-
|
|
43
|
-
### 5.1 Assistant research decisions and rationales
|
|
44
|
-
{assistant_decision_items}
|
|
45
|
-
|
|
46
|
-
### 5.2 Key assistant outputs
|
|
47
|
-
{assistant_items}
|
|
48
|
-
|
|
49
|
-
### 5.3 Key paths and filenames
|
|
50
|
-
{path_counts}
|
|
51
|
-
|
|
52
|
-
### 5.4 Errors and anomalies
|
|
53
|
-
{error_section}
|
|
54
|
-
|
|
55
|
-
## 6. Existing Compact Records
|
|
56
|
-
|
|
57
|
-
### 6.1 compact_boundary layer
|
|
58
|
-
{compact_boundary_items}
|
|
59
|
-
|
|
60
|
-
### 6.2 isCompactSummary layer
|
|
61
|
-
{compact_items}
|
|
62
|
-
|
|
63
|
-
### 6.3 Repeated compression policy
|
|
64
|
-
- Treat previous compact layers as prior memory, not as live stacked context.
|
|
65
|
-
- Fold still-relevant facts into the current compact summary.
|
|
66
|
-
- Keep provenance, hashes, file labels, and line ranges in metadata or sidecars.
|
|
67
|
-
- If prior layers themselves are too large, switch to a long-term memory ledger.
|
|
68
|
-
|
|
69
|
-
## 7. Recent Raw Preservation
|
|
70
|
-
|
|
71
|
-
{recent_preservation_notes}
|
|
72
|
-
|
|
73
|
-
## 8. Important Reminders
|
|
74
|
-
|
|
75
|
-
- Exact wording lives in the source JSONL or external archives.
|
|
76
|
-
- This file is a candidate transcript rewrite, not a proof of Claude runtime behavior.
|
|
77
|
-
- For humanities, law, art, strategy, planning, history, feasibility, and document-research sessions, preserve user goals, reasons, rejected alternatives, version changes, provenance, unresolved questions, and risk judgments.
|
|
78
|
-
- Project-specific facts must come from the JSONL or an explicit handoff summary, not from hardcoded skill memory.
|
|
1
|
+
# Codex Offline Compression Summary
|
|
2
|
+
|
|
3
|
+
This is a candidate Claude Code JSONL compact summary generated outside Claude. It summarizes only older records from the selected active chain. Rewound, inactive, and unattributed records are excluded.
|
|
4
|
+
|
|
5
|
+
## 1. Scope
|
|
6
|
+
|
|
7
|
+
- Source file label: {input_path}
|
|
8
|
+
- Original record count: {total_records}
|
|
9
|
+
- Active-chain records selected for summary: {omitted_record_count} records before the preserved active-chain window
|
|
10
|
+
- Recent raw active-chain records preserved: {recent_record_count} records
|
|
11
|
+
- Physical line window of preserved records: {recent_start} to {recent_end}
|
|
12
|
+
- Time span summarized: {first_ts} to {last_omitted_ts}
|
|
13
|
+
- Time span preserved: {first_kept_ts} to {last_kept_ts}
|
|
14
|
+
- Session distribution: {session_counts}
|
|
15
|
+
- Common working directories: {cwd_counts}
|
|
16
|
+
- Claude Code versions: {version_counts}
|
|
17
|
+
|
|
18
|
+
## 2. Structural Overview
|
|
19
|
+
|
|
20
|
+
- Record types: {type_counts}
|
|
21
|
+
- System subtypes: {subtype_counts}
|
|
22
|
+
- Tool invocation overview: {tool_counts}
|
|
23
|
+
- Attachment / hook overview: {attachment_counts}
|
|
24
|
+
- File history snapshots: {file_history_count}
|
|
25
|
+
- Existing compact summaries summarized into this layer: {existing_compact_count}
|
|
26
|
+
- Human user prompts: {human_user_count}
|
|
27
|
+
- Tool-result user records: {tool_result_user_count}
|
|
28
|
+
|
|
29
|
+
## 3. Long-Term Memory Ledger
|
|
30
|
+
|
|
31
|
+
{long_term_memory}
|
|
32
|
+
|
|
33
|
+
## 4. Early / Middle Summary
|
|
34
|
+
|
|
35
|
+
### 4.1 Early
|
|
36
|
+
{early_summary}
|
|
37
|
+
|
|
38
|
+
### 4.2 Middle
|
|
39
|
+
{middle_summary}
|
|
40
|
+
|
|
41
|
+
## 5. Assistant Behavior and Evidence
|
|
42
|
+
|
|
43
|
+
### 5.1 Assistant research decisions and rationales
|
|
44
|
+
{assistant_decision_items}
|
|
45
|
+
|
|
46
|
+
### 5.2 Key assistant outputs
|
|
47
|
+
{assistant_items}
|
|
48
|
+
|
|
49
|
+
### 5.3 Key paths and filenames
|
|
50
|
+
{path_counts}
|
|
51
|
+
|
|
52
|
+
### 5.4 Errors and anomalies
|
|
53
|
+
{error_section}
|
|
54
|
+
|
|
55
|
+
## 6. Existing Compact Records
|
|
56
|
+
|
|
57
|
+
### 6.1 compact_boundary layer
|
|
58
|
+
{compact_boundary_items}
|
|
59
|
+
|
|
60
|
+
### 6.2 isCompactSummary layer
|
|
61
|
+
{compact_items}
|
|
62
|
+
|
|
63
|
+
### 6.3 Repeated compression policy
|
|
64
|
+
- Treat previous compact layers as prior memory, not as live stacked context.
|
|
65
|
+
- Fold still-relevant facts into the current compact summary.
|
|
66
|
+
- Keep provenance, hashes, file labels, and line ranges in metadata or sidecars.
|
|
67
|
+
- If prior layers themselves are too large, switch to a long-term memory ledger.
|
|
68
|
+
|
|
69
|
+
## 7. Recent Raw Preservation
|
|
70
|
+
|
|
71
|
+
{recent_preservation_notes}
|
|
72
|
+
|
|
73
|
+
## 8. Important Reminders
|
|
74
|
+
|
|
75
|
+
- Exact wording lives in the source JSONL or external archives.
|
|
76
|
+
- This file is a candidate transcript rewrite, not a proof of Claude runtime behavior.
|
|
77
|
+
- For humanities, law, art, strategy, planning, history, feasibility, and document-research sessions, preserve user goals, reasons, rejected alternatives, version changes, provenance, unresolved questions, and risk judgments.
|
|
78
|
+
- Project-specific facts must come from the JSONL or an explicit handoff summary, not from hardcoded skill memory.
|