Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5cd657c
refactor: split claude-code session-start into sync + async setup
efenocchi Apr 14, 2026
b881f31
refactor: split codex session-start into sync + async setup
efenocchi Apr 14, 2026
bf20b21
feat: register session-start-setup as async hook
efenocchi Apr 14, 2026
a45dfd5
feat: add local JSONL capture queue
efenocchi Apr 14, 2026
e54ca3c
refactor: claude-code capture hook uses local queue
efenocchi Apr 14, 2026
35c07f6
refactor: codex capture + stop hooks use local queue
efenocchi Apr 14, 2026
2671b06
feat: wiki worker reads from local JSONL queue
efenocchi Apr 14, 2026
2967b75
build: add session-start-setup entry point to esbuild config
efenocchi Apr 14, 2026
d30ec15
test: add session-start and capture queue tests
efenocchi Apr 14, 2026
9abe44a
build: regenerate bundles for async hooks and capture queue
efenocchi Apr 14, 2026
3c58892
revert: remove local capture queue, restore direct server INSERTs
efenocchi Apr 14, 2026
5927891
fix: index.md now links to raw session files for all path formats
efenocchi Apr 14, 2026
39a5a42
fix: respect DEEPLAKE_CAPTURE=false across all hooks
efenocchi Apr 14, 2026
126372f
feat: fast-path grep and read now search both memory and sessions tables
efenocchi Apr 14, 2026
ee1ad25
feat: shared grep handler with single SQL query
efenocchi Apr 15, 2026
6111aaf
feat: fast-path all read commands via direct SQL
efenocchi Apr 15, 2026
aac9724
feat: codex grep fast-path via shared module
efenocchi Apr 15, 2026
7d9ca0c
fix: grep interceptor mount="/" never matching
efenocchi Apr 15, 2026
6629871
perf: remove deeplake_sync_table from all hooks
efenocchi Apr 15, 2026
212c81e
feat: SQL query tracing with DEEPLAKE_DEBUG
efenocchi Apr 15, 2026
8dcfbf5
fix: pass sessionsTable to grep interceptor in shell
efenocchi Apr 15, 2026
9f2b509
build: regenerate bundles for fast-path optimization
efenocchi Apr 15, 2026
9dd62af
docs: fast-path benchmark results and optimization plan
efenocchi Apr 15, 2026
2c258e0
feat: BM25 ranked search for grep + auto-create index
efenocchi Apr 16, 2026
8ca4ec6
build: regenerate bundles with BM25 support
efenocchi Apr 16, 2026
e7ef009
test: add grep-direct tests, update pre-tool-use tests for fast path
efenocchi Apr 16, 2026
9298bb9
ci: use PR description as release body
efenocchi Apr 16, 2026
b1ce688
merge: resolve conflicts with main (session-start auto-update, bundles)
efenocchi Apr 16, 2026
6bce30a
security: validate version tag before shell exec, escape find pattern…
efenocchi Apr 16, 2026
73e8e68
perf: use LIKE for grep search, simplify ensureTable
efenocchi Apr 16, 2026
b0472e7
feat: fast-path head, tail, wc, find for codex pre-tool-use hook
efenocchi Apr 16, 2026
efed74b
fix: add virtual index.md generation to codex hook
efenocchi Apr 16, 2026
266ab1a
chore: remove benchmark results from tracking, keep local only
efenocchi Apr 16, 2026
7c34d5c
ci: add test coverage reporting to CI workflow
efenocchi Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,28 @@ jobs:
- name: Install dependencies
run: npm install

- name: Run CI checks
run: npm run ci
- name: Typecheck
run: npm run typecheck

- name: Run tests with coverage
run: npx vitest run --coverage --coverage.reporter=text --coverage.reporter=json-summary

- name: Coverage summary
if: always()
run: |
if [ -f coverage/coverage-summary.json ]; then
echo "### Test Coverage" >> $GITHUB_STEP_SUMMARY
node -e "
const c = require('./coverage/coverage-summary.json').total;
const fmt = (v) => v.pct.toFixed(1) + '%';
console.log('| Metric | Coverage |');
console.log('|--------|----------|');
console.log('| Statements | ' + fmt(c.statements) + ' |');
console.log('| Branches | ' + fmt(c.branches) + ' |');
console.log('| Functions | ' + fmt(c.functions) + ' |');
console.log('| Lines | ' + fmt(c.lines) + ' |');
" >> $GITHUB_STEP_SUMMARY
fi

- name: Build bundles
run: npm run build
Expand Down
21 changes: 19 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,27 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get merged PR description
if: steps.check.outputs.exists == 'false'
id: pr
run: |
# Find the most recent merged PR targeting main
PR_BODY=$(gh pr list --state merged --base main --limit 1 --json body,title -q '.[0].body // ""')
PR_TITLE=$(gh pr list --state merged --base main --limit 1 --json title -q '.[0].title // ""')
{
echo "body<<ENDOFBODY"
echo "$PR_BODY"
echo "ENDOFBODY"
echo "title=$PR_TITLE"
} >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create GitHub Release
if: steps.check.outputs.exists == 'false'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.version }}
name: ${{ steps.version.outputs.version }}
generate_release_notes: true
name: "${{ steps.version.outputs.version }} — ${{ steps.pr.outputs.title }}"
body: ${{ steps.pr.outputs.body }}
generate_release_notes: false
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ coverage/
bench/
.claude/
CLAUDE.md
RESULTS-fast-path-all-commands.md
PLAN-fast-path-all-commands.md
25 changes: 24 additions & 1 deletion claude-code/bundle/capture.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,20 @@ function sqlStr(value) {

// dist/src/deeplake-api.js
var log2 = (msg) => log("sdk", msg);
var TRACE_SQL = process.env.DEEPLAKE_TRACE_SQL === "1" || process.env.DEEPLAKE_DEBUG === "1";
var DEBUG_FILE_LOG = process.env.DEEPLAKE_DEBUG === "1";
function summarizeSql(sql, maxLen = 220) {
const compact = sql.replace(/\s+/g, " ").trim();
return compact.length > maxLen ? `${compact.slice(0, maxLen)}...` : compact;
}
function traceSql(msg) {
if (!TRACE_SQL)
return;
process.stderr.write(`[deeplake-sql] ${msg}
`);
if (DEBUG_FILE_LOG)
log2(msg);
}
var RETRYABLE_CODES = /* @__PURE__ */ new Set([429, 500, 502, 503, 504]);
var MAX_RETRIES = 3;
var BASE_DELAY_MS = 500;
Expand Down Expand Up @@ -119,9 +133,18 @@ var DeeplakeApi = class {
}
/** Execute SQL with retry on transient errors and bounded concurrency. */
async query(sql) {
const startedAt = Date.now();
const summary = summarizeSql(sql);
traceSql(`query start: ${summary}`);
await this._sem.acquire();
try {
return await this._queryWithRetry(sql);
const rows = await this._queryWithRetry(sql);
traceSql(`query ok (${Date.now() - startedAt}ms, rows=${rows.length}): ${summary}`);
return rows;
} catch (e) {
const message = e instanceof Error ? e.message : String(e);
traceSql(`query fail (${Date.now() - startedAt}ms): ${summary} :: ${message}`);
throw e;
} finally {
this._sem.release();
}
Expand Down
25 changes: 24 additions & 1 deletion claude-code/bundle/commands/auth-login.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,20 @@ function sqlStr(value) {

// dist/src/deeplake-api.js
var log2 = (msg) => log("sdk", msg);
var TRACE_SQL = process.env.DEEPLAKE_TRACE_SQL === "1" || process.env.DEEPLAKE_DEBUG === "1";
var DEBUG_FILE_LOG = process.env.DEEPLAKE_DEBUG === "1";
function summarizeSql(sql, maxLen = 220) {
const compact = sql.replace(/\s+/g, " ").trim();
return compact.length > maxLen ? `${compact.slice(0, maxLen)}...` : compact;
}
function traceSql(msg) {
if (!TRACE_SQL)
return;
process.stderr.write(`[deeplake-sql] ${msg}
`);
if (DEBUG_FILE_LOG)
log2(msg);
}
var RETRYABLE_CODES = /* @__PURE__ */ new Set([429, 500, 502, 503, 504]);
var MAX_RETRIES = 3;
var BASE_DELAY_MS = 500;
Expand Down Expand Up @@ -303,9 +317,18 @@ var DeeplakeApi = class {
}
/** Execute SQL with retry on transient errors and bounded concurrency. */
async query(sql) {
const startedAt = Date.now();
const summary = summarizeSql(sql);
traceSql(`query start: ${summary}`);
await this._sem.acquire();
try {
return await this._queryWithRetry(sql);
const rows = await this._queryWithRetry(sql);
traceSql(`query ok (${Date.now() - startedAt}ms, rows=${rows.length}): ${summary}`);
return rows;
} catch (e) {
const message = e instanceof Error ? e.message : String(e);
traceSql(`query fail (${Date.now() - startedAt}ms): ${summary} :: ${message}`);
throw e;
} finally {
this._sem.release();
}
Expand Down
Loading
Loading