* fix(import): handle BOMs at the byte level in decodeFileContent
Inspect leading bytes before decoding: EF BB BF strips the UTF-8 BOM and
decodes the remainder (falling back to Windows-1252 for the remainder only,
so the fallback can no longer produce a literal mojibake prefix), and
FF FE / FE FF decode as UTF-16LE/BE. stripBOM additionally strips a literal
mojibake BOM prefix for string paths pre-decoded elsewhere.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(import): make an explicit SEB choice at least as good as auto-detect
Three changes for the SEB bank CSV report:
- parseBankFile: when an explicit format parses 0 transactions, fall back
to auto-detection; a different format that parses rows is returned with a
prepended info issue naming both formats. A working explicit parse is
never overridden, and explicit generic_csv (the manual mapping escape
hatch) is exempt.
- SEB profile: sniff the header delimiter (';' vs ',') and split with the
quote-aware parseCSVLine; accept a bare Datum date column as a lowest
priority tier in parse only, never in detect. Its user-reachable issue
strings are now Swedish.
- Import page: when a parse yields 0 transactions, show the parser's real
issues instead of only the generic no-transactions hint.
The v1 agent route now decodes through the shared decodeFileContent and
stamps external ids, import_source, and the stored file format from the
format the parse result actually carries, so fallback imports dedup
identically to auto-detected ones.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* docs(api-v1): the bank import route also decodes UTF-16
CodeRabbit on #1565: decodeFileContent gained UTF-16LE/BE BOM support
but the route overview and the registered endpoint description still
listed only UTF-8 / Windows-1252. Skill regenerated (apiskill:generate).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* feat(api): installable accounted-api agent skill + openapi-to-skill generator
Three layers, per the July/August 2026 agent-skills ecosystem (skills.sh /
npx skills add, as used by Stripe/Cloudflare/Supabase for their APIs):
- skills/openapi-to-skill/: generic, installable skill that turns any
OpenAPI spec into a consumer-side integration skill, with a portable
stdlib-only inventory/condenser tool and an output template + quality
checklist encoding the distill-not-restate methodology.
- skills/accounted-api/: the installable skill for our own API, rendered
deterministically by scripts/api-skill/generate.ts from the v1 endpoint
registry + hand-authored overlays (auth, conventions, domain gotchas).
CI gate: npm run apiskill:check (core-build.yml).
- lib/api/v1/registry.ts: generateOpenApiSpec now emits requestBody (incl.
multipart binary parts) and path parameters, and the Zod converter learned
.default()/z.record()/.pipe()/.transform(), so the public spec carries
request contracts instead of prose-only.
Docs: /docs/api landing + /llms.txt now point agents at the skill install;
corrected the stale test-key description in the landing (test keys read
real data and force dry-run writes; they are not sandbox-company bound).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(skills): escape backslashes in markdown table cells (CodeQL js/incomplete-sanitization)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>