logicsrc/packages
Anthony Ettinger eb013aebdd Read a Bitwarden JSON export natively
Importing a Bitwarden export failed with "Not an OpenCreds database" and had to
be converted by hand first. The import command decided what a file was by
`text.trimStart().startsWith("{")`, and treated every JSON as an OpenCreds
database. A Bitwarden export starts with a brace too, so it went to parseDatabase
and was rejected there.

JSON is the format Bitwarden's own UI hands you by default, and the only one of
its formats that keeps folders, custom fields, multiple URIs per login and full
card/identity detail. Its CSV drops all of that, so "export as CSV instead" is a
lossy workaround rather than an answer.

The shape is now sniffed before deciding which reader owns the file: an `items`
array plus either a `folders` array or the `encrypted` flag. An OpenCreds
database has neither at its top level, so the two never collide, and a cheap
substring test means a large database is not parsed twice to find that out.

Everything the format carries is mapped: all four item types, Bitwarden's own
folder ids (so two folders sharing a name stay distinct), custom fields with
their hidden flag, every URI rather than only the first, TOTP secrets, and
favourites. An untitled login is still named after its host. A folderId naming no
folder is dropped rather than inventing a folder, and only folders something
actually landed in come back, so importing one item out of a big export does not
create sixteen empty folders beside it.

An encrypted export is refused outright instead of half-read. Its items are
opaque strings, so a best-effort parse would store ciphertext as if it were a
password and leave a vault full of junk that never decrypts.

Verified against a real 4,395-item export: 4,387 logins, 3 cards, 4 identities,
1 note, 16 folders, zero skipped, parsed in 56ms. Every count matches the source
file, and the command that used to fail now reports "(Bitwarden JSON)".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 10:55:19 +00:00
..
account-core Handle non-finite policy risk scores (#75) 2026-06-15 01:23:47 -07:00
agentad feat(agentad): AgentAd Marketplace PRD + reference exchange (M5) 2026-07-01 10:29:36 +00:00
agentstack feat(agentstack): add delegation authority checks (#87) 2026-07-01 01:14:40 -07:00
agentswarm chore(agentswarm): make package publishable to npm 2026-06-25 17:57:32 +00:00
ans fix(ans): reject non-hex input in fromHex instead of silently decoding to 0 (#91) 2026-07-02 16:37:39 -07:00
cli vault + teams: filter secrets by category, export to CSV, simpler help (#195) 2026-09-23 21:08:08 -07:00
logicsrc-mcp OpenFleet reference implementation: @logicsrc/openfleet, logicsrc fleet, and Claude Code hooks (#185) 2026-09-13 10:58:55 +00:00
opencontext Enforce OpenContext HTTP byte limit while streaming (#136) 2026-08-09 21:57:05 -07:00
opencreds Read a Bitwarden JSON export natively 2026-09-24 10:55:19 +00:00
openfleet OpenFleet reference implementation: @logicsrc/openfleet, logicsrc fleet, and Claude Code hooks (#185) 2026-09-13 10:58:55 +00:00
openontology fix(openontology): migrate in one transaction, and stop timing out on slow disks (#124) 2026-08-03 06:38:05 -07:00
openprd Release @logicsrc/openprd 0.2.0 to npm (#145) 2026-09-07 05:01:33 -07:00
plugin-core Scaffold LogicSRC and CommandBoard plugins 2026-06-06 11:24:02 +00:00
schemas Add OpenABTest draft experiment and accounting contracts (#180) 2026-09-13 02:17:35 -07:00
sdk Add OpenABTest draft experiment and accounting contracts (#180) 2026-09-13 02:17:35 -07:00
tui feat(openontology): Phase 2 + Phase 3 — storage, REST/SSE, MCP, RDF/SHACL, adapters, TUI, explorer (#101) 2026-07-28 05:10:33 -07:00
validators Add OpenABTest draft experiment and accounting contracts (#180) 2026-09-13 02:17:35 -07:00