opencode-sessions-explorer 0.1.0 → 0.1.1
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 +10 -0
- package/README.md +114 -267
- package/dist/plugin.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.1] - 2026-06-13
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Documentation restructure: organized the `docs/` tree (getting started, install, guides,
|
|
14
|
+
reference, support, maintainers) and reworked `README.md` into a concise entry point that
|
|
15
|
+
links out to the new docs.
|
|
16
|
+
- Generalized the product descriptions and wording across `package.json`, `README.md`, and
|
|
17
|
+
the docs tree so they are non-parochial (removed machine- and author-specific phrasing).
|
|
18
|
+
No runtime or API changes.
|
|
19
|
+
|
|
10
20
|
## [0.1.0] - 2026-06-13
|
|
11
21
|
|
|
12
22
|
Initial public release on npm.
|
package/README.md
CHANGED
|
@@ -1,62 +1,46 @@
|
|
|
1
1
|
# opencode-sessions-explorer
|
|
2
2
|
|
|
3
|
-
> Access to every prior OpenCode session on your machine — recall, search/grep, and historical analysis via 18 LLM-discoverable tools (17 read-only + one explicit unarchive write).
|
|
4
|
-
|
|
5
3
|
[](https://github.com/iamironz/opencode-sessions-explorer/actions/workflows/ci.yml)
|
|
6
4
|
[](https://www.npmjs.com/package/opencode-sessions-explorer)
|
|
7
5
|
[](LICENSE)
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Install
|
|
7
|
+
Recall, search, and analyze every past [OpenCode](https://opencode.ai) session —
|
|
8
|
+
18 LLM-discoverable tools over the OpenCode SQLite database.
|
|
14
9
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```jsonc
|
|
22
|
-
// ~/.config/opencode/opencode.json
|
|
23
|
-
{
|
|
24
|
-
"$schema": "https://opencode.ai/config.json",
|
|
10
|
+
`opencode-sessions-explorer` is an OpenCode plugin that exposes your OpenCode
|
|
11
|
+
session history (`~/.local/share/opencode/opencode.db`) to the running model as a
|
|
12
|
+
set of named tools — 17 read-only (recall, search/grep, cost/usage analysis) plus
|
|
13
|
+
one explicit `unarchive-session` write. Ask in natural language and the model picks
|
|
14
|
+
the right tool automatically; nothing leaves your device.
|
|
25
15
|
|
|
26
|
-
|
|
27
|
-
"opencode-sessions-explorer"
|
|
28
|
-
],
|
|
16
|
+
Example questions it answers:
|
|
29
17
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
```text
|
|
19
|
+
Where in my history did I mention the export codec?
|
|
20
|
+
Summarize session ses_… and list the files it touched.
|
|
21
|
+
How much did I spend on Claude this month, by project?
|
|
22
|
+
Which tool fails most for me, and what errors keep recurring?
|
|
23
|
+
Unarchive session ses_… so I can open it again.
|
|
36
24
|
```
|
|
37
25
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Then **quit and restart OpenCode**. All 18 tools auto-register.
|
|
26
|
+
## Compatibility
|
|
41
27
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
28
|
+
| Area | Support | Notes |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| OpenCode | Plugin host | Loads the plugin and owns the source database |
|
|
31
|
+
| Bun | `>= 1.0` | Runtime; the plugin uses `bun:sqlite` (OpenCode ships Bun) |
|
|
32
|
+
| `ck` | `>= 0.7`, optional | Only `search-text` / `grep-session` need it; the other 16 tools work without it |
|
|
33
|
+
| OS | macOS / Linux | Windows paths resolve via `%LOCALAPPDATA%` |
|
|
45
34
|
|
|
46
|
-
|
|
35
|
+
## Quick Start
|
|
47
36
|
|
|
48
|
-
|
|
49
|
-
the npm package:
|
|
37
|
+
1. Add the plugin and grant access to the OpenCode data directory, then restart:
|
|
50
38
|
|
|
51
39
|
```jsonc
|
|
52
40
|
// ~/.config/opencode/opencode.json
|
|
53
41
|
{
|
|
54
42
|
"$schema": "https://opencode.ai/config.json",
|
|
55
|
-
|
|
56
|
-
"plugin": [
|
|
57
|
-
"file:///absolute/path/to/opencode-sessions-explorer/dist/plugin.js"
|
|
58
|
-
],
|
|
59
|
-
|
|
43
|
+
"plugin": ["opencode-sessions-explorer"],
|
|
60
44
|
"permission": {
|
|
61
45
|
"external_directory": {
|
|
62
46
|
"~/.local/share/opencode/**": "allow"
|
|
@@ -65,239 +49,102 @@ the npm package:
|
|
|
65
49
|
}
|
|
66
50
|
```
|
|
67
51
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## First run
|
|
75
|
-
|
|
76
|
-
The text-search tools (`search-text`, `grep-session`) need a filesystem export of your session content (used by `ck` for indexed search). The export contains both raw replay files and derived channel views used for cleaner default recall:
|
|
52
|
+
1. **Quit and restart OpenCode.** All 18 tools auto-register. OpenCode auto-installs
|
|
53
|
+
npm plugins with Bun on startup, so there is no separate `npm install` step.
|
|
54
|
+
1. Materialize the search export once, then verify the install:
|
|
77
55
|
|
|
78
56
|
```bash
|
|
79
|
-
# One-time, ~30-60s for typical histories
|
|
80
57
|
bunx opencode-sessions-explorer-bulk-export
|
|
81
|
-
|
|
82
|
-
# After upgrading from pre-channel versions, backfill curated recall views
|
|
83
|
-
bunx opencode-sessions-explorer-bulk-export --reset
|
|
84
|
-
|
|
85
|
-
# Optional: build the semantic search index (~5 h for ~150k parts; resumable)
|
|
86
|
-
cd ~/.local/share/opencode-sessions-explorer && ck --index .
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
After the first export, the plugin auto-syncs new parts on every search call (3-4s budget).
|
|
90
|
-
|
|
91
|
-
Run the health check anytime:
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
58
|
bunx opencode-sessions-explorer-check-deps
|
|
95
59
|
```
|
|
96
60
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
173
|
-
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
"dict": { "agent": ["build","executor-gpt"], "model": [{"id":"gpt-5.5-fast", "...": "..."}], "directory": ["/Users/you"] },
|
|
185
|
-
"rows": [ ["ses_…","Title…",0,0,0, "…", true] ]
|
|
186
|
-
}
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
**Decode rule (single):** a cell in a column whose name is a key in `dict` is an integer index into `dict[col]`; otherwise it is the literal value. Scalars next to the table (`has_more`, `mode`, `suppressed`, …) are unchanged. A reference decoder ships as `decodeTable()` in `src/lib/table.ts`. The envelope (`ok`/`data`/`meta`/`warnings`) is unchanged.
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
## Architecture (4 layers)
|
|
194
|
-
|
|
195
|
-
```
|
|
196
|
-
L1 SQLite DB ← source of truth (read-only access)
|
|
197
|
-
↓ (delta sync, runs before every search call)
|
|
198
|
-
L2 opencode-sessions-explorer/ tree ← raw by-session replay + derived by-channel views
|
|
199
|
-
↓ (conversation, session-summary, tool-error,
|
|
200
|
-
↓ code-touch, tool-output, reasoning, etc.)
|
|
201
|
-
L3 .ck/ index ← BM25 (Tantivy) + embeddings (bge-small),
|
|
202
|
-
↓ auto-incremental via blake3 chunk hash
|
|
203
|
-
L4 enriched response ← every hit re-fetches session/part metadata
|
|
204
|
-
from SQLite for accuracy
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
All **reads** go through a shared `bun:sqlite` handle opened `readonly: true` + `PRAGMA query_only = 1`; any accidental write on that path throws. The single exception is the `unarchive-session` tool — see [Writes](#writes).
|
|
208
|
-
|
|
209
|
-
---
|
|
210
|
-
|
|
211
|
-
## Writes
|
|
212
|
-
|
|
213
|
-
17 of the 18 tools are strictly read-only. The lone exception is **`unarchive-session`**, which restores an archived session so it can be opened and prompted again.
|
|
214
|
-
|
|
215
|
-
- **Why a direct DB write?** OpenCode exposes no archive/unarchive endpoint that can *clear* the flag: its HTTP `UpdatePayload` types `time.archived` as a finite number and the handler ignores `undefined`, so a clear/`null` can't be sent over the wire (verified against v1.15.12 source). `opencode session` only offers `list`/`delete`. A direct DB write is the only mechanism.
|
|
216
|
-
- **What it writes.** It clears `time_archived` **and** refreshes `time_updated` to now, in one `UPDATE`, via a separate short-lived read-write connection (`src/lib/db-write.ts`); the shared read handle stays read-only. It **always restores to a usable state** — including an already-active-but-buried session (e.g. one unarchived by an older build that didn't refresh `time_updated`) — so it is not a silent no-op on active sessions; it is idempotent in effect (active + at the top). Only a non-existent id is rejected (`NOT_FOUND`).
|
|
217
|
-
- **Why bump `time_updated`?** OpenCode's app/server load the session list ordered by `time_updated DESC` with a default `LIMIT 100` **per directory**. A long-archived session keeps an old `time_updated`, so merely clearing `time_archived` leaves it buried below that window — the app never loads it and prompting fails with *"Unable to retrieve session"*. Refreshing `time_updated` resurfaces the restored session at the top, where the app loads it (this is also the intuitive meaning of "restore").
|
|
218
|
-
- **Permission.** No extra permission is needed: the existing `external_directory: { "~/.local/share/opencode/**": "allow" }` rule already covers read+write access to the DB file.
|
|
219
|
-
- **After restoring.** An external write emits no `session.updated` event, so an already-open OpenCode window won't update live. **Reload/restart the window** and open OpenCode in the session's **directory** (sessions are listed per directory). Because `time_updated` is refreshed, the restored session then appears at the top of the list.
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
## Configuration
|
|
224
|
-
|
|
225
|
-
All paths are env-overridable:
|
|
226
|
-
|
|
227
|
-
| Env var | Default | Purpose |
|
|
228
|
-
| -------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------ |
|
|
229
|
-
| `OPENCODE_SESSIONS_EXPLORER_DB` | `$XDG_DATA_HOME/opencode/opencode.db` (Linux/Mac) / `%LOCALAPPDATA%/opencode/opencode.db` (Win) | Path to the OpenCode SQLite DB |
|
|
230
|
-
| `OPENCODE_SESSIONS_EXPLORER_EXPORT_ROOT` | `$XDG_DATA_HOME/opencode-sessions-explorer` | Where to materialize searchable session content |
|
|
231
|
-
| `OPENCODE_SESSIONS_EXPLORER_TOOL_OUTPUT_DIR` | `$XDG_DATA_HOME/opencode/tool-output` | Whitelist root for `get-part` dereference |
|
|
232
|
-
| `OPENCODE_SESSIONS_EXPLORER_CK_BIN` | `ck` (via $PATH) | Override `ck` binary location |
|
|
233
|
-
|
|
234
|
-
---
|
|
235
|
-
|
|
236
|
-
## Privacy
|
|
237
|
-
|
|
238
|
-
The plugin exposes **all your prior OpenCode conversations** to the LLM — including tool inputs/outputs that may contain credentials, API tokens, file contents, and other sensitive material. Consider:
|
|
239
|
-
|
|
240
|
-
- The `search-text` and `grep-session` tools redact common secret shapes (`AKIA…`, `ghp_…`, `sk-…`, JWTs, bearer tokens, etc.) in returned snippets by default. Pass `redact:false` only for explicit local forensics.
|
|
241
|
-
- All access is **local read-only** — no data leaves your machine via this plugin.
|
|
242
|
-
- The `external_directory` permission rule is required because the DB lives outside your project workspace; you grant it explicitly.
|
|
243
|
-
|
|
244
|
-
---
|
|
245
|
-
|
|
246
|
-
## Development
|
|
247
|
-
|
|
248
|
-
```bash
|
|
249
|
-
# Install
|
|
250
|
-
bun install
|
|
251
|
-
|
|
252
|
-
# Typecheck
|
|
253
|
-
bun run typecheck
|
|
254
|
-
|
|
255
|
-
# Build to dist/
|
|
256
|
-
bun run build
|
|
257
|
-
|
|
258
|
-
# Run the rehearsal harness (hermetic by default; live DB via OPENCODE_SESSIONS_EXPLORER_LIVE=1)
|
|
259
|
-
bun test
|
|
260
|
-
|
|
261
|
-
# End-to-end verifier (compares tool output vs ground-truth SQL; needs a live DB)
|
|
262
|
-
bun tests/verify-end-to-end.ts
|
|
263
|
-
|
|
264
|
-
# Plugin invocation (sanity)
|
|
265
|
-
bun src/plugin.ts
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
### Repo layout
|
|
269
|
-
|
|
270
|
-
```
|
|
271
|
-
src/
|
|
272
|
-
├── plugin.ts default Plugin export — registers all 18 tools
|
|
273
|
-
├── tools/
|
|
274
|
-
│ ├── index.ts registry { "opencode-sessions-explorer-…": toolDefinition, … }
|
|
275
|
-
│ ├── current-session.ts 1 per tool — named const, not default export
|
|
276
|
-
│ ├── unarchive-session.ts the only write tool (clears time_archived + resurfaces)
|
|
277
|
-
│ └── (16 more)
|
|
278
|
-
├── lib/ shared internals (db, db-write, ck, export, decode, …)
|
|
279
|
-
└── bin/
|
|
280
|
-
├── bulk-export.ts materializes session content for ck
|
|
281
|
-
├── dedupe-export.ts maintenance
|
|
282
|
-
└── check-deps.ts install health probe
|
|
283
|
-
|
|
284
|
-
tests/
|
|
285
|
-
├── rehearsal.test.ts read-only probes (hermetic fixture by default; live DB opt-in)
|
|
286
|
-
├── unarchive.test.ts write-path probes (run against a throwaway DB copy)
|
|
287
|
-
├── helpers.ts
|
|
288
|
-
├── fixtures.json session IDs used by the rehearsal probes
|
|
289
|
-
└── verify-end-to-end.ts smoke verifier — runs every tool + compares vs SQL
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
---
|
|
293
|
-
|
|
294
|
-
## Status
|
|
295
|
-
|
|
296
|
-
- 18 tools registered (17 read-only + 1 unarchive write)
|
|
297
|
-
- Published on npm as [`opencode-sessions-explorer`](https://www.npmjs.com/package/opencode-sessions-explorer)
|
|
298
|
-
- Test suite passing **hermetically by default** against a synthetic fixture DB (live-DB probes opt-in via `OPENCODE_SESSIONS_EXPLORER_LIVE=1`; unarchive write-path probes run against a throwaway DB copy)
|
|
299
|
-
- 17/17 end-to-end tool verification passing (unarchive probed via the zero-mutation NOT_FOUND path)
|
|
300
|
-
- Local and npm plugin installs verified end-to-end
|
|
61
|
+
The `external_directory` permission is required because the OpenCode database lives
|
|
62
|
+
outside your project workspace. For installing from source, version pinning, and the
|
|
63
|
+
full first-run walkthrough, see [docs/install.md](docs/install.md) and
|
|
64
|
+
[docs/getting-started.md](docs/getting-started.md).
|
|
65
|
+
|
|
66
|
+
## Features
|
|
67
|
+
|
|
68
|
+
### Recall and Navigation
|
|
69
|
+
|
|
70
|
+
- **Find your bearings.** `current-session`, `get-session`, and `session-summary`
|
|
71
|
+
report where you are and what a session contains.
|
|
72
|
+
- **Walk a session.** `session-timeline` and `session-genealogy` trace the
|
|
73
|
+
chronology and the parent/subagent chain.
|
|
74
|
+
- **Drill into detail.** `get-message` and `get-part` fetch individual messages and
|
|
75
|
+
parts, with optional tool-output dereference.
|
|
76
|
+
- **Browse and filter.** `list-sessions` and `search-sessions-meta` find sessions by
|
|
77
|
+
recency, agent, directory, title, or cost.
|
|
78
|
+
- See [docs/guides/recall-and-navigation.md](docs/guides/recall-and-navigation.md).
|
|
79
|
+
|
|
80
|
+
### Content Search and Grep
|
|
81
|
+
|
|
82
|
+
- **Search across history.** `search-text` answers "where did I mention X?" with
|
|
83
|
+
curated session-first recall by default.
|
|
84
|
+
- **Grep one session.** `grep-session` scans a single session's curated channels,
|
|
85
|
+
with raw replay via `surface:'forensics'`.
|
|
86
|
+
- **Audit tool calls.** `search-tool-calls` finds every invocation of a command,
|
|
87
|
+
every read that errored, or all calls to a given MCP.
|
|
88
|
+
- See [docs/guides/search-and-grep.md](docs/guides/search-and-grep.md).
|
|
89
|
+
|
|
90
|
+
### Cost and Usage Analysis
|
|
91
|
+
|
|
92
|
+
- **Spend by dimension.** `cost-by-project` breaks cost down by project, directory,
|
|
93
|
+
agent, or model.
|
|
94
|
+
- **Spend over time.** `cost-by-period` reports OpenCode spend per day, week, or month.
|
|
95
|
+
- **Failure and repetition signals.** `list-tool-failures` and
|
|
96
|
+
`list-repeated-prompts` surface recurring errors and duplicated questions.
|
|
97
|
+
- See [docs/guides/cost-and-usage-analysis.md](docs/guides/cost-and-usage-analysis.md).
|
|
98
|
+
|
|
99
|
+
### Export and Maintenance
|
|
100
|
+
|
|
101
|
+
- **One-time export.** `bulk-export` materializes searchable session content for `ck`.
|
|
102
|
+
- **Stay current.** The plugin auto-syncs new parts before each search call; rebuild
|
|
103
|
+
the optional semantic index when you want embeddings.
|
|
104
|
+
- **Health probe.** `check-deps` and the `db-stats` tool report dependency and schema
|
|
105
|
+
health.
|
|
106
|
+
- See [docs/guides/export-and-maintenance.md](docs/guides/export-and-maintenance.md).
|
|
107
|
+
|
|
108
|
+
### Archived Session Recovery
|
|
109
|
+
|
|
110
|
+
- **Restore a buried session.** `unarchive-session` is the one write tool — it clears
|
|
111
|
+
`time_archived` **and** refreshes `time_updated` so the session resurfaces at the
|
|
112
|
+
top of the per-directory list and can be opened again.
|
|
113
|
+
- See [docs/guides/manage-archived-sessions.md](docs/guides/manage-archived-sessions.md).
|
|
114
|
+
|
|
115
|
+
### Privacy and Safety
|
|
116
|
+
|
|
117
|
+
- **Local and read-only by default.** 17 of 18 tools never write; no data leaves your
|
|
118
|
+
device through this plugin.
|
|
119
|
+
- **Secret redaction.** `search-text` / `grep-session` redact common secret shapes in
|
|
120
|
+
snippets by default; `get-part` dereference is path-guarded to a whitelist root.
|
|
121
|
+
- See [docs/reference/configuration.md](docs/reference/configuration.md) and
|
|
122
|
+
[.github/SECURITY.md](.github/SECURITY.md).
|
|
123
|
+
|
|
124
|
+
## Documentation
|
|
125
|
+
|
|
126
|
+
Docs home: [docs/README.md](docs/README.md)
|
|
127
|
+
|
|
128
|
+
| Goal | Doc |
|
|
129
|
+
| --- | --- |
|
|
130
|
+
| Install and first run | [docs/install.md](docs/install.md), [docs/getting-started.md](docs/getting-started.md) |
|
|
131
|
+
| Recall and navigation | [docs/guides/recall-and-navigation.md](docs/guides/recall-and-navigation.md) |
|
|
132
|
+
| Search and grep | [docs/guides/search-and-grep.md](docs/guides/search-and-grep.md) |
|
|
133
|
+
| Cost and usage analysis | [docs/guides/cost-and-usage-analysis.md](docs/guides/cost-and-usage-analysis.md) |
|
|
134
|
+
| Export and maintenance | [docs/guides/export-and-maintenance.md](docs/guides/export-and-maintenance.md) |
|
|
135
|
+
| Archived session recovery | [docs/guides/manage-archived-sessions.md](docs/guides/manage-archived-sessions.md) |
|
|
136
|
+
| Tool reference | [docs/reference/tools.md](docs/reference/tools.md) |
|
|
137
|
+
| Configuration | [docs/reference/configuration.md](docs/reference/configuration.md) |
|
|
138
|
+
| Search surfaces | [docs/reference/search-surfaces.md](docs/reference/search-surfaces.md) |
|
|
139
|
+
| Response format | [docs/reference/response-format.md](docs/reference/response-format.md) |
|
|
140
|
+
| Architecture | [docs/reference/architecture.md](docs/reference/architecture.md) |
|
|
141
|
+
| Troubleshooting | [docs/support/troubleshooting.md](docs/support/troubleshooting.md) |
|
|
142
|
+
| Maintainer and release | [docs/maintainers/development.md](docs/maintainers/development.md), [docs/maintainers/release.md](docs/maintainers/release.md) |
|
|
143
|
+
| Change log | [CHANGELOG.md](CHANGELOG.md) |
|
|
144
|
+
|
|
145
|
+
## Contributing
|
|
146
|
+
|
|
147
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
301
148
|
|
|
302
149
|
## License
|
|
303
150
|
|
package/dist/plugin.js
CHANGED
|
@@ -13633,7 +13633,7 @@ function safe(fn) {
|
|
|
13633
13633
|
|
|
13634
13634
|
// src/tools/db-stats.ts
|
|
13635
13635
|
var dbStats = tool({
|
|
13636
|
-
description: "opencode-sessions-explorer: health probe for the
|
|
13636
|
+
description: "opencode-sessions-explorer: health probe for the OpenCode SQLite database (~/.local/share/opencode/opencode.db). " + "Returns migration head, table counts (session/message/part), json1 extension status, busy_timeout, and any schema-drift warnings. " + "Run this when troubleshooting: any opencode-sessions-explorer-* tool returning SCHEMA_DRIFT, after an OpenCode upgrade, when verifying the DB is reachable, or when answering 'is opencode.db healthy / what schema is it on / how many sessions are stored'.",
|
|
13637
13637
|
args: {},
|
|
13638
13638
|
async execute() {
|
|
13639
13639
|
return runWithEnvelope("db_stats", 8, async () => {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "opencode-sessions-explorer",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"description": "OpenCode plugin
|
|
4
|
+
"version": "0.1.1",
|
|
5
|
+
"description": "OpenCode plugin for recall and analysis of past OpenCode sessions: search, grep, and cost/usage insights across your session history via 18 LLM tools (17 read-only plus one write, unarchive-session).",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"opencode",
|
|
8
8
|
"opencode-plugin",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"zod": "^4.0.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@opencode-ai/plugin": "1.
|
|
70
|
+
"@opencode-ai/plugin": "1.17.4",
|
|
71
71
|
"@types/bun": "latest",
|
|
72
|
-
"typescript": "^
|
|
72
|
+
"typescript": "^6.0.3"
|
|
73
73
|
}
|
|
74
74
|
}
|