Merge wasm-port-bd-44d0: Add npm package with native binaries

Merges complete npm package implementation for @beads/bd.

Features:
- npm package wrapping native bd binaries
- Automatic platform-specific binary download
- Claude Code for Web integration via SessionStart hooks
- Comprehensive integration test suite (5 tests, all passing)
- Complete documentation (6 guides)
- Release process documentation

Published to npm: https://www.npmjs.com/package/@beads/bd

Benefits over WASM:
- Full SQLite support (native vs custom VFS)
- Better performance
- Simpler implementation and maintenance
- 100% feature parity with standalone bd

Closes bd-febc
This commit is contained in:
Steve Yegge
2025-11-03 12:08:39 -08:00
32 changed files with 3969 additions and 67 deletions

View File

@@ -14,7 +14,8 @@ import (
// Import SQLite driver
"github.com/steveyegge/beads/internal/types"
_ "modernc.org/sqlite"
_ "github.com/ncruces/go-sqlite3/driver"
_ "github.com/ncruces/go-sqlite3/embed"
)
// SQLiteStorage implements the Storage interface using SQLite
@@ -56,7 +57,7 @@ func New(path string) (*SQLiteStorage, error) {
connStr += "?_pragma=journal_mode(WAL)&_pragma=foreign_keys(ON)&_pragma=busy_timeout(30000)&_time_format=sqlite"
}
db, err := sql.Open("sqlite", connStr)
db, err := sql.Open("sqlite3", connStr)
if err != nil {
return nil, fmt.Errorf("failed to open database: %w", err)
}

View File

@@ -8,7 +8,8 @@ import (
"time"
"github.com/steveyegge/beads/internal/types"
_ "modernc.org/sqlite"
_ "github.com/ncruces/go-sqlite3/driver"
_ "github.com/ncruces/go-sqlite3/embed"
)
func setupTestDB(t *testing.T) (*SQLiteStorage, func()) {