opencode-sessions-explorer 0.1.2 → 0.1.4
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 +16 -0
- package/README.md +7 -3
- package/dist/bin/bulk-export.js +827 -159
- package/dist/bin/check-deps.js +836 -167
- package/dist/bin/dedupe-export.js +825 -157
- package/dist/lib/export-reconcile-worker.js +1519 -0
- package/dist/plugin.js +1133 -208
- package/docs/getting-started.md +5 -4
- package/docs/guides/export-and-maintenance.md +6 -3
- package/docs/guides/search-and-grep.md +6 -3
- package/docs/reference/architecture.md +10 -5
- package/package.json +2 -2
package/docs/getting-started.md
CHANGED
|
@@ -54,13 +54,14 @@ history, then branch into the right workflow guide.
|
|
|
54
54
|
bunx opencode-sessions-explorer-bulk-export
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
1. (Optional)
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
1. (Optional) Prewarm the `ck` index. Normal `mode:'lex'`, `mode:'sem'`, and
|
|
58
|
+
`mode:'hybrid'` searches let `ck` lazily build or refresh indexes during the
|
|
59
|
+
search; prewarming only avoids first-search latency or helps troubleshooting.
|
|
60
|
+
Run it in the export root, not in the repository checkout:
|
|
60
61
|
|
|
61
62
|
```bash
|
|
62
63
|
cd ~/.local/share/opencode-sessions-explorer
|
|
63
|
-
ck --index . #
|
|
64
|
+
ck --index . # optional prewarm in the export root
|
|
64
65
|
```
|
|
65
66
|
|
|
66
67
|
1. Run the install health probe again and confirm there are no hard failures:
|
|
@@ -54,13 +54,16 @@ maintenance.
|
|
|
54
54
|
bunx opencode-sessions-explorer-bulk-export --reset
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
1. (Optional)
|
|
58
|
-
|
|
57
|
+
1. (Optional) Prewarm the `ck` index. Normal `lex`, `sem`, and `hybrid` searches
|
|
58
|
+
invoke `ck` in the requested mode so `ck` can lazily build or refresh indexes
|
|
59
|
+
during the search. Run these commands only to avoid first-search latency or to
|
|
60
|
+
troubleshoot stale/partial coverage warnings, and run them from the export root,
|
|
59
61
|
not from the repository checkout:
|
|
60
62
|
|
|
61
63
|
```bash
|
|
62
64
|
cd ~/.local/share/opencode-sessions-explorer
|
|
63
|
-
ck --index . #
|
|
65
|
+
ck --index . # optional prewarm in the export root
|
|
66
|
+
ck --reindex . # optional troubleshooting refresh
|
|
64
67
|
```
|
|
65
68
|
|
|
66
69
|
1. Verify everything is wired up, and re-run after any OpenCode upgrade:
|
|
@@ -25,9 +25,12 @@ known session, and audit individual tool invocations by name, status, or substri
|
|
|
25
25
|
|
|
26
26
|
`search-text` and `grep-session` shell out to the optional [`ck`](https://github.com/BeaconBay/ck)
|
|
27
27
|
CLI over the filesystem export tree. If `ck` is not installed, both return
|
|
28
|
-
`CK_NOT_FOUND` cleanly; the other 16 tools keep working without it.
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
`CK_NOT_FOUND` cleanly; the other 16 tools keep working without it. Normal `lex`,
|
|
29
|
+
`sem`, and `hybrid` searches invoke `ck` in that mode so `ck` can lazily build or
|
|
30
|
+
refresh its own indexes during the search. Explicit `ck --index .` or
|
|
31
|
+
`ck --reindex .` runs from the export root are optional prewarm/troubleshooting
|
|
32
|
+
steps, not required before first use. If an index is missing, stale, or partially
|
|
33
|
+
verified, the tools warn that the first/lazy-refresh run may be slow or partial. See
|
|
31
34
|
[search surfaces](../reference/search-surfaces.md) for the surface/channel model.
|
|
32
35
|
|
|
33
36
|
## Controls
|
|
@@ -48,9 +48,11 @@ Searchable content is materialized to a filesystem tree (default
|
|
|
48
48
|
|
|
49
49
|
The tree is built once by `opencode-sessions-explorer-bulk-export` and then
|
|
50
50
|
delta-synced automatically before each `search-text` / `grep-session` call, so new
|
|
51
|
-
parts become searchable without a manual re-export.
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
parts become searchable without a manual re-export. Budgeted sync uses an id-cursor
|
|
52
|
+
insert fast path for newly appended parts, plus session-dirty scans keyed by
|
|
53
|
+
`session.time_updated` to re-export sessions whose part status or metadata changed.
|
|
54
|
+
Short search-triggered syncs also schedule a throttled background reconcile, while
|
|
55
|
+
unbudgeted bulk exports perform full tombstone cleanup inline.
|
|
54
56
|
|
|
55
57
|
### L3 — ck Index (Optional)
|
|
56
58
|
|
|
@@ -59,6 +61,9 @@ CLI, which walks the export tree. `ck` supports plain regex with no index, a BM2
|
|
|
59
61
|
full-text index, and semantic embeddings; the index lives under `.ck/` in the export
|
|
60
62
|
root and is incremental. `ck` is optional: when it is absent these two tools return
|
|
61
63
|
`CK_NOT_FOUND` cleanly and the other 16 tools are unaffected.
|
|
64
|
+
The plugin invokes normal `lex`, `sem`, and `hybrid` `ck` searches and lets `ck`
|
|
65
|
+
perform its lazy index build/refresh; explicit index commands are optional prewarm
|
|
66
|
+
or troubleshooting steps, not a prerequisite for first use.
|
|
62
67
|
|
|
63
68
|
### L4 — Enriched Response
|
|
64
69
|
|
|
@@ -87,12 +92,12 @@ flag, so the direct database write is the only mechanism.
|
|
|
87
92
|
|
|
88
93
|
## Examples
|
|
89
94
|
|
|
90
|
-
Materialize the export tree (L2), then
|
|
95
|
+
Materialize the export tree (L2), then optionally prewarm the `ck` index (L3):
|
|
91
96
|
|
|
92
97
|
```bash
|
|
93
98
|
bunx opencode-sessions-explorer-bulk-export
|
|
94
99
|
cd ~/.local/share/opencode-sessions-explorer
|
|
95
|
-
ck --index . #
|
|
100
|
+
ck --index . # optional prewarm from the export root
|
|
96
101
|
```
|
|
97
102
|
|
|
98
103
|
Verify all four layers are healthy:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "opencode-sessions-explorer",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.4",
|
|
5
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",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"opencode-sessions-explorer-check-deps": "./dist/bin/check-deps.js"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
|
-
"build": "bun run clean && bun build src/plugin.ts --target=bun --format=esm --outdir=dist && bun build src/bin/bulk-export.ts src/bin/dedupe-export.ts src/bin/check-deps.ts --target=bun --format=esm --outdir=dist/bin",
|
|
48
|
+
"build": "bun run clean && bun build src/plugin.ts src/lib/export-reconcile-worker.ts --target=bun --format=esm --outdir=dist && bun build src/bin/bulk-export.ts src/bin/dedupe-export.ts src/bin/check-deps.ts --target=bun --format=esm --outdir=dist/bin",
|
|
49
49
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
50
50
|
"test": "bun test tests/",
|
|
51
51
|
"test:live": "OPENCODE_SESSIONS_EXPLORER_LIVE=1 bun test tests/",
|