Fix bd-2: Add daemon RPC support for sync export operations

- Added OpExport/OpImport to RPC protocol
- Implemented handleExport() in daemon to export via RPC
- Modified sync command to use daemon export when available
- Prevents nil pointer dereference when daemon is running
- Falls back to direct mode if daemon unavailable
This commit is contained in:
Steve Yegge
2025-10-22 00:00:50 -07:00
parent e691fa00b1
commit 49ed3e74f0
4 changed files with 195 additions and 0 deletions

View File

@@ -297,3 +297,13 @@ func (c *Client) ReposStats() (*Response, error) {
func (c *Client) ReposClearCache() (*Response, error) {
return c.Execute(OpReposClearCache, struct{}{})
}
// Export exports the database to JSONL format
func (c *Client) Export(args *ExportArgs) (*Response, error) {
return c.Execute(OpExport, args)
}
// Import imports issues from JSONL format
func (c *Client) Import(args *ImportArgs) (*Response, error) {
return c.Execute(OpImport, args)
}