agentic-loadout 0.7.1__tar.gz → 0.7.2__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.
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/CHANGELOG.md +6 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/PKG-INFO +3 -3
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/README.md +2 -2
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/pyproject.toml +1 -1
- agentic_loadout-0.7.2/src/agentic_loadout/__init__.py +1 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/UPSTREAM.md +3 -3
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/memory-1/SKILL.md +2 -1
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/memory-1/scripts/export_sessions.py +67 -5
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/pins.py +1 -1
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/test_export_sessions_entire.py +2 -1
- agentic_loadout-0.7.2/tests/test_export_sessions_opencode.py +80 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/uv.lock +1 -1
- agentic_loadout-0.7.1/src/agentic_loadout/__init__.py +0 -1
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/.codex/hooks.json +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/.entire/.gitignore +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/.entire/settings.json +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/.gitattributes +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/.github/workflows/ci.yml +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/.github/workflows/release.yaml +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/.gitignore +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/LICENSE +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/PLAN.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/PLAN.orig.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/docs/agentic-loadout.jpeg +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/docs/entire-investigation.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/docs/memory-1-docs-1-integration.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/docs/original-implementation-plan.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/scripts/overlays/memory-1/SKILL.entire-note.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/scripts/overlays/memory-1/export_sessions.entire-code.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/scripts/overlays/memory-1/export_sessions.entire-flag.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/scripts/overlays/memory-1/export_sessions.entire-import.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/scripts/overlays/memory-1/export_sessions.entire-only.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/scripts/overlays/memory-1/export_sessions.entire-run.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/scripts/overlays/overlays.toml +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/scripts/release_notes.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/scripts/sync_skills.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/agents.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/agents/architect.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/agents/code-grader.head.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/agents/coder.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/agents/tiers/code-reviewer.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/agents/tiers/coder-small.supplement.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/agents/utility.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/development-workflow.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/docs-1/SKILL.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/docs-1/scripts/docs_index.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/docs-1/templates/doc.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/memory-1/scripts/memory_check.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/memory-1/templates/LATER.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/memory-1/templates/MEMORY.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/memory-1/templates/NOW.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/memory-1/templates/notes/_example.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/memory-1/templates/sessions/.gitignore +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/memory-1/templates/sessions/INDEX.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/agents-rules.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/coders/go.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/coders/python.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/coders/swift.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/coders/typescript.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/docs-rules.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/entire-rules.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/entire-sessions.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/memory-legacy.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/memory-rules.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/sdd-rules.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/small-delegation.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/worktree-rules.md +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/brew.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/cli.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/coders.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/detect.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/entire.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/files.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/git_state.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/install.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/instructions.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/legacy.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/mcp_config.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/options.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/preflight.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/runners.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/skills.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/ui.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/vendors.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/__init__.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/baseline-agent-hashes.json +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/conftest.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/test_detect_and_brew.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/test_entire.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/test_entire_optin.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/test_install.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/test_instructions.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/test_mcp_config.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/test_memory_docs.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/test_skill_upgrade.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/test_small_agents.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/test_sync_skills.py +0 -0
- {agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/tests/test_vendored_skills.py +0 -0
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.2] - 2026-11-16
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- memory-1's session export now reads [opencode](https://opencode.ai) sessions too (from its SQLite database, opened
|
|
7
|
+
read-only; subagent sessions are skipped), next to Claude Code and Codex (memory-1 at `9572f47`).
|
|
8
|
+
|
|
3
9
|
## [0.7.1] - 2026-11-16
|
|
4
10
|
|
|
5
11
|
Found while upgrading a real project from 0.6.x.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: agentic-loadout
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: One command that gives a project an agent setup: memory and docs skills, the SDD skill, subagents and language coders with code-navigation MCPs. Project-scoped, for Claude Code, Cursor and Codex.
|
|
5
5
|
Project-URL: Repository, https://github.com/illescasDaniel/agentic-loadout
|
|
6
6
|
Project-URL: Issues, https://github.com/illescasDaniel/agentic-loadout/issues
|
|
@@ -32,7 +32,7 @@ One command that gives a project a coding-agent setup, for Claude Code, Cursor a
|
|
|
32
32
|
|
|
33
33
|
- **Memory:** the [memory-1](https://github.com/illescasDaniel/memory-1-skill) skill keeps current state, decisions and
|
|
34
34
|
durable notes as plain Markdown in `memory/`, so a new session picks up where the last one stopped. There is no
|
|
35
|
-
server, database or hook: the agent reads and greps files.
|
|
35
|
+
server, database or hook: the agent reads and greps files. Its optional session archive exports Claude Code, Codex and opencode transcripts.
|
|
36
36
|
- **Docs:** the [docs-1](https://github.com/illescasDaniel/docs-1-skill) skill keeps `docs/` indexed and in step with
|
|
37
37
|
the code (a generated `docs/INDEX.md`, doc IDs, a check that finds the docs a changed file touches).
|
|
38
38
|
- **Spec-driven development:** the `sdd-feature` skill takes a feature through design, spec, tests, implementation and
|
|
@@ -52,7 +52,7 @@ Needs Node.js 20+ for the `sdd-feature` and `worktree` skills and the TypeScript
|
|
|
52
52
|
with gopls for the Go coder. memory-1 and docs-1 need nothing but Python 3 (their scripts use the standard library).
|
|
53
53
|
|
|
54
54
|
`--python 3.12` makes `uvx` use a tested Python instead of whichever is newest on your machine. To pin the loadout
|
|
55
|
-
version, run `uvx --python 3.12 agentic-loadout@0.7.
|
|
55
|
+
version, run `uvx --python 3.12 agentic-loadout@0.7.2 .`; individual dependencies may have their own version policy.
|
|
56
56
|
|
|
57
57
|
> [!NOTE]
|
|
58
58
|
> Claude Code has its own built-in auto memory. To keep one shared memory in the repository (memory-1's `memory/`), turn
|
|
@@ -10,7 +10,7 @@ One command that gives a project a coding-agent setup, for Claude Code, Cursor a
|
|
|
10
10
|
|
|
11
11
|
- **Memory:** the [memory-1](https://github.com/illescasDaniel/memory-1-skill) skill keeps current state, decisions and
|
|
12
12
|
durable notes as plain Markdown in `memory/`, so a new session picks up where the last one stopped. There is no
|
|
13
|
-
server, database or hook: the agent reads and greps files.
|
|
13
|
+
server, database or hook: the agent reads and greps files. Its optional session archive exports Claude Code, Codex and opencode transcripts.
|
|
14
14
|
- **Docs:** the [docs-1](https://github.com/illescasDaniel/docs-1-skill) skill keeps `docs/` indexed and in step with
|
|
15
15
|
the code (a generated `docs/INDEX.md`, doc IDs, a check that finds the docs a changed file touches).
|
|
16
16
|
- **Spec-driven development:** the `sdd-feature` skill takes a feature through design, spec, tests, implementation and
|
|
@@ -30,7 +30,7 @@ Needs Node.js 20+ for the `sdd-feature` and `worktree` skills and the TypeScript
|
|
|
30
30
|
with gopls for the Go coder. memory-1 and docs-1 need nothing but Python 3 (their scripts use the standard library).
|
|
31
31
|
|
|
32
32
|
`--python 3.12` makes `uvx` use a tested Python instead of whichever is newest on your machine. To pin the loadout
|
|
33
|
-
version, run `uvx --python 3.12 agentic-loadout@0.7.
|
|
33
|
+
version, run `uvx --python 3.12 agentic-loadout@0.7.2 .`; individual dependencies may have their own version policy.
|
|
34
34
|
|
|
35
35
|
> [!NOTE]
|
|
36
36
|
> Claude Code has its own built-in auto memory. To keep one shared memory in the repository (memory-1's `memory/`), turn
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "agentic-loadout"
|
|
3
|
-
version = "0.7.
|
|
3
|
+
version = "0.7.2"
|
|
4
4
|
description = "One command that gives a project an agent setup: memory and docs skills, the SDD skill, subagents and language coders with code-navigation MCPs. Project-scoped, for Claude Code, Cursor and Codex."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.7.2"
|
{agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/UPSTREAM.md
RENAMED
|
@@ -4,7 +4,7 @@ agentic-loadout ships adapted copies of two Agent Skills. Each copy is made from
|
|
|
4
4
|
|
|
5
5
|
| Skill | Upstream repository | Commit |
|
|
6
6
|
|---|---|---|
|
|
7
|
-
| `memory-1` | https://github.com/illescasDaniel/memory-1-skill | `
|
|
7
|
+
| `memory-1` | https://github.com/illescasDaniel/memory-1-skill | `9572f47adf262f262600e2e36fd58f3af19be43f` |
|
|
8
8
|
| `docs-1` | https://github.com/illescasDaniel/docs-1-skill | `0fdbd5fbc39a7f5e6f8efb76a688ba3b734fcde9` |
|
|
9
9
|
|
|
10
10
|
## What differs from upstream
|
|
@@ -24,8 +24,8 @@ Every difference is an insertion between an `agentic-loadout:begin NAME` and an
|
|
|
24
24
|
|
|
25
25
|
| File | sha256 | Differs |
|
|
26
26
|
|---|---|---|
|
|
27
|
-
| `memory-1/SKILL.md` | `
|
|
28
|
-
| `memory-1/scripts/export_sessions.py` | `
|
|
27
|
+
| `memory-1/SKILL.md` | `67c33009adacee1e6de690f272b9a45a106b7a42011a08ed52f0e2eb3dd5a804` | yes |
|
|
28
|
+
| `memory-1/scripts/export_sessions.py` | `7b98729c9a2c7033f86d890d9849da0670149167545cd7f93f734d31d7b83073` | yes |
|
|
29
29
|
| `memory-1/scripts/memory_check.py` | `4e617dbb339f4a67b9d0cb9c9db70b2e61ff51cb0c6580db9ac59f41f0f67522` | no |
|
|
30
30
|
| `memory-1/templates/LATER.md` | `b215b01ed2f7434b1287a2ebfc8dd7d69b89a97d0d464b7aa1ba7d0d65c1a676` | no |
|
|
31
31
|
| `memory-1/templates/MEMORY.md` | `71375e4b3012cb78b1854265f9612752e8ca91e8bb59917b5642d4bddf0d9ad4` | no |
|
{agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/memory-1/SKILL.md
RENAMED
|
@@ -222,7 +222,8 @@ The archive keeps the detail that notes summarise away. Export past sessions wit
|
|
|
222
222
|
python3 <skill dir>/scripts/export_sessions.py --project . --out memory/sessions
|
|
223
223
|
```
|
|
224
224
|
|
|
225
|
-
It reads Claude Code (`~/.claude/projects/`)
|
|
225
|
+
It reads Claude Code (`~/.claude/projects/`), Codex (`~/.codex/sessions/`) and opencode (its SQLite database,
|
|
226
|
+
read-only) transcripts for this project, keeps only
|
|
226
227
|
user and assistant prose, redacts credential-like strings, and writes one file per session. It prints only the files
|
|
227
228
|
that are new or changed (a session that grew since the last export is rewritten), so it is safe to run every time.
|
|
228
229
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""Export a project's agent sessions (Claude Code, Codex) to condensed, redacted Markdown.
|
|
2
|
+
"""Export a project's agent sessions (Claude Code, Codex, opencode) to condensed, redacted Markdown.
|
|
3
3
|
|
|
4
4
|
Keeps only what the user and the assistant said to each other: no tool calls, tool output, reasoning or injected
|
|
5
5
|
instructions. One file per session, named <first date>-<session id prefix>.md. A file is rewritten only when its
|
|
@@ -14,7 +14,10 @@ import argparse
|
|
|
14
14
|
import json
|
|
15
15
|
import os
|
|
16
16
|
import re
|
|
17
|
+
import sqlite3
|
|
17
18
|
import sys
|
|
19
|
+
from datetime import datetime, timezone
|
|
20
|
+
from functools import partial
|
|
18
21
|
from pathlib import Path
|
|
19
22
|
|
|
20
23
|
# agentic-loadout:begin entire-import
|
|
@@ -24,6 +27,7 @@ import subprocess
|
|
|
24
27
|
HOME = Path.home()
|
|
25
28
|
CLAUDE_ROOT = Path(os.environ.get("CLAUDE_CONFIG_DIR", HOME / ".claude")) / "projects"
|
|
26
29
|
CODEX_ROOT = Path(os.environ.get("CODEX_HOME", HOME / ".codex")) / "sessions"
|
|
30
|
+
OPENCODE_DB = Path(os.environ.get("XDG_DATA_HOME") or HOME / ".local" / "share") / "opencode" / "opencode.db"
|
|
27
31
|
|
|
28
32
|
# Injected context rather than conversation.
|
|
29
33
|
SKIP_PREFIXES = (
|
|
@@ -114,6 +118,62 @@ def read_codex(path):
|
|
|
114
118
|
yield role, event.get("timestamp", ""), text
|
|
115
119
|
|
|
116
120
|
|
|
121
|
+
def opencode_db(note=True):
|
|
122
|
+
"""Open opencode's database read-only, or return None (missing, locked or unreadable) with one short note."""
|
|
123
|
+
if not OPENCODE_DB.is_file():
|
|
124
|
+
return None
|
|
125
|
+
try:
|
|
126
|
+
return sqlite3.connect(OPENCODE_DB.resolve().as_uri() + "?mode=ro", uri=True, timeout=1)
|
|
127
|
+
except sqlite3.Error as err:
|
|
128
|
+
if note:
|
|
129
|
+
print(f"opencode: cannot open its database ({err}); skipped", file=sys.stderr)
|
|
130
|
+
return None
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def opencode_sessions(project):
|
|
134
|
+
"""Return ids of opencode's own (not subagent) sessions whose working directory is inside the project."""
|
|
135
|
+
db = opencode_db()
|
|
136
|
+
if not db:
|
|
137
|
+
return []
|
|
138
|
+
try:
|
|
139
|
+
with db:
|
|
140
|
+
rows = db.execute("SELECT id, directory FROM session_v2 WHERE parent_id IS NULL ORDER BY time_created").fetchall()
|
|
141
|
+
except sqlite3.Error as err:
|
|
142
|
+
print(f"opencode: cannot read its sessions ({err}); skipped", file=sys.stderr)
|
|
143
|
+
return []
|
|
144
|
+
finally:
|
|
145
|
+
db.close()
|
|
146
|
+
return [sid for sid, directory in rows if inside(directory, project)]
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def read_opencode(sid, path):
|
|
150
|
+
"""Yield (role, timestamp, text) from an opencode session; drops reasoning, tool items and compaction summaries."""
|
|
151
|
+
db = opencode_db(note=False)
|
|
152
|
+
if not db:
|
|
153
|
+
return
|
|
154
|
+
try:
|
|
155
|
+
with db:
|
|
156
|
+
rows = db.execute("SELECT type, time_created, data FROM session_message WHERE session_id = ? "
|
|
157
|
+
"AND type IN ('user', 'assistant') ORDER BY seq", (sid,)).fetchall()
|
|
158
|
+
except sqlite3.Error:
|
|
159
|
+
return
|
|
160
|
+
finally:
|
|
161
|
+
db.close()
|
|
162
|
+
for role, millis, raw in rows:
|
|
163
|
+
try:
|
|
164
|
+
data = json.loads(raw)
|
|
165
|
+
if role == "user":
|
|
166
|
+
text = data.get("text")
|
|
167
|
+
else:
|
|
168
|
+
text = "\n".join(b.get("text", "") for b in data.get("content") or []
|
|
169
|
+
if isinstance(b, dict) and b.get("type") == "text")
|
|
170
|
+
stamp = datetime.fromtimestamp(millis / 1000, timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
|
171
|
+
except (ValueError, AttributeError, TypeError, OverflowError, OSError):
|
|
172
|
+
continue
|
|
173
|
+
if isinstance(text, str) and text.strip():
|
|
174
|
+
yield role, stamp, text.strip()
|
|
175
|
+
|
|
176
|
+
|
|
117
177
|
def claude_cwd(path):
|
|
118
178
|
with path.open(encoding="utf-8", errors="replace") as fh:
|
|
119
179
|
for _, raw in zip(range(50), fh):
|
|
@@ -148,6 +208,7 @@ def find_sessions(project, claude_dirs):
|
|
|
148
208
|
# Codex stores each subagent and automatic review as its own rollout; only the user's own sessions count.
|
|
149
209
|
if inside(meta.get("cwd"), project) and not (isinstance(meta.get("source"), dict) and "subagent" in meta["source"]):
|
|
150
210
|
found.append(("codex", path, read_codex))
|
|
211
|
+
found += [("opencode", OPENCODE_DB, partial(read_opencode, sid)) for sid in opencode_sessions(project)]
|
|
151
212
|
return found
|
|
152
213
|
|
|
153
214
|
|
|
@@ -160,10 +221,11 @@ def render(client, path, reader, max_chars):
|
|
|
160
221
|
if not turns or not any(r == "user" for r, _, _ in turns):
|
|
161
222
|
return None, None
|
|
162
223
|
first, last = turns[0][1], turns[-1][1]
|
|
163
|
-
# Claude Code ids are random UUIDs; Codex ids are time-ordered
|
|
164
|
-
|
|
224
|
+
# Claude Code ids are random UUIDs; Codex and opencode ids are time-ordered, so take their random tail instead.
|
|
225
|
+
stem = reader.args[0] if client == "opencode" else path.stem # an opencode session is a row, not a file
|
|
226
|
+
sid = stem[:8] if client == "claude" else stem[-8:]
|
|
165
227
|
name = f"{first[:10] or 'undated'}-{sid}.md"
|
|
166
|
-
body = [f"# Session {
|
|
228
|
+
body = [f"# Session {stem} ({client})\n\n{first[:16].replace('T', ' ')} to {last[:16].replace('T', ' ')} UTC, "
|
|
167
229
|
f"{len(turns)} messages. Tool calls and outputs are not exported.\n"]
|
|
168
230
|
body += [f"### {role} {stamp[:16].replace('T', ' ')}\n{text}\n" for role, stamp, text in turns]
|
|
169
231
|
return name, "\n".join(body)
|
|
@@ -371,7 +433,7 @@ def main(argv=None):
|
|
|
371
433
|
return entire_main(project, out, args)
|
|
372
434
|
# agentic-loadout:end entire-only
|
|
373
435
|
if not sessions:
|
|
374
|
-
print(f"no Claude Code or
|
|
436
|
+
print(f"no Claude Code, Codex or opencode sessions found for {project}", file=sys.stderr)
|
|
375
437
|
return 1
|
|
376
438
|
rendered = {}
|
|
377
439
|
for client, path, reader in sessions:
|
|
@@ -8,7 +8,7 @@ WORKTREE_SKILL = "illescasDaniel/worktree-skill"
|
|
|
8
8
|
WORKTREE_SKILL_REF = "37674c26b84eca9df37d8dafccc367da7455d079"
|
|
9
9
|
WORKTREE_SKILL_NAME = "worktree"
|
|
10
10
|
MEMORY_SKILL = "illescasDaniel/memory-1-skill"
|
|
11
|
-
MEMORY_SKILL_REF = "
|
|
11
|
+
MEMORY_SKILL_REF = "9572f47adf262f262600e2e36fd58f3af19be43f"
|
|
12
12
|
MEMORY_SKILL_NAME = "memory-1"
|
|
13
13
|
DOCS_SKILL = "illescasDaniel/docs-1-skill"
|
|
14
14
|
DOCS_SKILL_REF = "0fdbd5fbc39a7f5e6f8efb76a688ba3b734fcde9"
|
|
@@ -26,6 +26,7 @@ def agent_homes(tmp_path_factory, monkeypatch):
|
|
|
26
26
|
monkeypatch.setattr(exporter, "HOME", home)
|
|
27
27
|
monkeypatch.setattr(exporter, "CLAUDE_ROOT", home / ".claude/projects")
|
|
28
28
|
monkeypatch.setattr(exporter, "CODEX_ROOT", home / ".codex/sessions")
|
|
29
|
+
monkeypatch.setattr(exporter, "OPENCODE_DB", home / "opencode/opencode.db")
|
|
29
30
|
return home
|
|
30
31
|
|
|
31
32
|
|
|
@@ -201,7 +202,7 @@ def test_the_pass_only_reads_git_data(repo):
|
|
|
201
202
|
def test_without_the_flag_entire_checkpoints_are_ignored_and_the_native_behaviour_is_unchanged(repo, capsys):
|
|
202
203
|
commit_ref(repo, "refs/entire/checkpoints/7X/01AAAA", session_files(CODEX_ID, "codex", TURNS))
|
|
203
204
|
assert run(repo, entire=False) == 1
|
|
204
|
-
assert "no Claude Code or
|
|
205
|
+
assert "no Claude Code, Codex or opencode sessions found" in capsys.readouterr().err and not (repo / "memory").exists()
|
|
205
206
|
|
|
206
207
|
|
|
207
208
|
def test_native_sessions_are_exported_first_and_entire_adds_only_what_is_missing(repo, capsys):
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""opencode sessions in the adapted memory-1 export_sessions.py, read from synthetic SQLite databases (never the real one)."""
|
|
2
|
+
|
|
3
|
+
import importlib.util
|
|
4
|
+
import json
|
|
5
|
+
import sqlite3
|
|
6
|
+
import sys
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
import pytest
|
|
10
|
+
|
|
11
|
+
SCRIPT = Path(__file__).parent.parent / "src/agentic_loadout/assets/skills/memory-1/scripts/export_sessions.py"
|
|
12
|
+
spec = importlib.util.spec_from_file_location("export_sessions_opencode", SCRIPT)
|
|
13
|
+
exporter = importlib.util.module_from_spec(spec)
|
|
14
|
+
sys.modules[spec.name] = exporter
|
|
15
|
+
spec.loader.exec_module(exporter)
|
|
16
|
+
|
|
17
|
+
MAIN_ID = "ses_aaaa1111bbbb2222"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@pytest.fixture
|
|
21
|
+
def db_path(tmp_path, monkeypatch):
|
|
22
|
+
empty = tmp_path / "home"
|
|
23
|
+
monkeypatch.setattr(exporter, "HOME", empty)
|
|
24
|
+
monkeypatch.setattr(exporter, "CLAUDE_ROOT", empty / ".claude/projects")
|
|
25
|
+
monkeypatch.setattr(exporter, "CODEX_ROOT", empty / ".codex/sessions")
|
|
26
|
+
path = tmp_path / "data" / "opencode" / "opencode.db"
|
|
27
|
+
monkeypatch.setattr(exporter, "OPENCODE_DB", path)
|
|
28
|
+
return path
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def make_db(path, project):
|
|
32
|
+
path.parent.mkdir(parents=True)
|
|
33
|
+
db = sqlite3.connect(path)
|
|
34
|
+
db.execute("CREATE TABLE session_v2(id, project_id, parent_id, directory, title, time_created, time_updated)")
|
|
35
|
+
db.execute("CREATE TABLE session_message(id, session_id, type, seq, time_created, data)")
|
|
36
|
+
db.execute("INSERT INTO session_v2 VALUES (?, 'p', NULL, ?, 't', 1, 1)", (MAIN_ID, str(project / "sub")))
|
|
37
|
+
db.execute("INSERT INTO session_v2 VALUES ('ses_child', 'p', ?, ?, 't', 1, 1)", (MAIN_ID, str(project)))
|
|
38
|
+
messages = [
|
|
39
|
+
("user", {"text": "hello"}),
|
|
40
|
+
("assistant", {"content": [{"type": "reasoning", "text": "private thought"}, {"type": "tool", "name": "x"},
|
|
41
|
+
{"type": "text", "text": "hi there"}]}),
|
|
42
|
+
("compaction", {"summary": "a summary"}),
|
|
43
|
+
("user", {"text": "bye"}),
|
|
44
|
+
]
|
|
45
|
+
for sid in (MAIN_ID, "ses_child"):
|
|
46
|
+
for seq, (kind, data) in enumerate(messages):
|
|
47
|
+
db.execute("INSERT INTO session_message VALUES (?, ?, ?, ?, ?, ?)",
|
|
48
|
+
(f"{sid}-{seq}", sid, kind, seq, 1790000000000 + seq * 1000, json.dumps(data)))
|
|
49
|
+
db.commit()
|
|
50
|
+
db.close()
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def test_exports_visible_conversation_and_skips_subagent_sessions(tmp_path, db_path):
|
|
54
|
+
project = tmp_path / "proj"
|
|
55
|
+
project.mkdir()
|
|
56
|
+
make_db(db_path, project)
|
|
57
|
+
found = exporter.find_sessions(project, None)
|
|
58
|
+
assert [c for c, *_ in found] == ["opencode"] # the subagent session is not listed
|
|
59
|
+
client, path, reader = found[0]
|
|
60
|
+
name, text = exporter.render(client, path, reader, 6000)
|
|
61
|
+
assert name.endswith("-bbbb2222.md")
|
|
62
|
+
assert "hello" in text and "hi there" in text and "bye" in text
|
|
63
|
+
assert "private thought" not in text and "a summary" not in text and "(opencode)" in text
|
|
64
|
+
assert exporter.render(client, path, reader, 6000)[1] == text # same input, same output: unchanged on a re-run
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def test_other_projects_and_a_missing_database_export_nothing(tmp_path, db_path, capsys):
|
|
68
|
+
project = tmp_path / "proj"
|
|
69
|
+
project.mkdir()
|
|
70
|
+
assert exporter.find_sessions(project, None) == [] # no database at all
|
|
71
|
+
make_db(db_path, project)
|
|
72
|
+
assert exporter.find_sessions(tmp_path / "elsewhere", None) == []
|
|
73
|
+
assert exporter.main(["--project", str(tmp_path / "elsewhere"), "--out", str(tmp_path / "out")]) == 1
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def test_database_without_the_tables_is_skipped_with_a_note(tmp_path, db_path, capsys):
|
|
77
|
+
db_path.parent.mkdir(parents=True)
|
|
78
|
+
sqlite3.connect(db_path).close()
|
|
79
|
+
assert exporter.find_sessions(tmp_path, None) == []
|
|
80
|
+
assert "opencode" in capsys.readouterr().err
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.7.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/scripts/overlays/memory-1/SKILL.entire-note.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/agents/architect.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/agents/utility.md
RENAMED
|
File without changes
|
{agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/development-workflow.md
RENAMED
|
File without changes
|
{agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/skills/docs-1/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/agents-rules.md
RENAMED
|
File without changes
|
{agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/coders/go.md
RENAMED
|
File without changes
|
|
File without changes
|
{agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/coders/swift.md
RENAMED
|
File without changes
|
|
File without changes
|
{agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/docs-rules.md
RENAMED
|
File without changes
|
{agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/entire-rules.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/memory-rules.md
RENAMED
|
File without changes
|
{agentic_loadout-0.7.1 → agentic_loadout-0.7.2}/src/agentic_loadout/assets/templates/sdd-rules.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|