3 Commits (2adbc95645e88a8c53c450b3e7981ac4e3f2100b)

Author SHA1 Message Date
Elijah Voigt 5ddf9a56e1 feat(nbd): add Turso/libsql cache for list performance [833807]
Migrate async runtime from async-std to tokio (required by libsql),
then add a mtime-based libsql cache at .nbd/cache.db that accelerates
nbd list, nbd ready, and nbd next by avoiding redundant file reads.

- Cargo.toml: replace async-std with tokio + libsql = "0.6"
- src/store.rs: async_std → tokio fs API; add open_cache() and
  list_tickets_cached() with fallback to list_tickets on error
- src/main.rs: tokio::main, tokio::fs::remove_file; wire cmd_list,
  cmd_ready, cmd_next to list_tickets_cached
- src/tests.rs: async_std::test → tokio::test, async_std::fs → tokio::fs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 0bd7bd8c0f feat(nbd): add multi-format ticket storage (md, toml, jsonb) [460caf]
Tickets can now be stored in four formats, selected with --ftype:
  json  (.json) — pretty-printed JSON, default, unchanged
  md    (.md)   — Markdown body with TOML frontmatter
  toml  (.toml) — full TOML
  jsonb (.jsonb) — CBOR binary via ciborium

Changes:
- store.rs: FileFormat enum, detect_format(), find_ticket_path(),
  per-format serialize/deserialize helpers; read_ticket/list_tickets/
  resolve_id/migrate_tickets all scan all known extensions
- main.rs: --ftype on create (default "json") and update (optional,
  converts format and removes old file); archive/update preserve
  existing format when --ftype is absent
- tests.rs: update write_ticket/ticket_path call sites; add TOML,
  Markdown, and CBOR roundtrip unit tests
- integration.rs: 8 new format tests covering create, list, update
  conversion, format preservation, body roundtrip, unknown-ftype error

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt a7adc1659c feat(nbd): scaffold crate with module stubs and dependencies
Creates Cargo.toml with clap, async-std, serde/serde_json and tempfile
dev-dep. Adds placeholder src/{main,ticket,store,display,tests}.rs and
tests/integration.rs with rustdoc module comments. Phase 1 complete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago