SIGN IN SIGN UP

refactor(api): remove NiaClient and legacy HTTP code (v0.5.1)

Delete legacy NiaClient implementation and migrate to SDK-only:

Deleted:
- src/api/client.ts (500 lines)
- src/api/client.test.ts (919 lines)

Simplified:
- src/api/types.ts - reduced from 624 to ~33 lines (plugin-internal types only)
- src/config.ts - removed NIA_USE_SDK flag and useSdk option
- src/index.ts - removed dual-path logic, always uses SDK adapter
- src/utils/format.ts - removed NiaClient-specific error parsing
- All 17 tools - removed if/else useSdk branches, SDK-only paths
- All test files - updated error expectations for SDK format

Error Format Change:
- Old: 'unauthorized [401]: bad key'
- New: 'search_error: HTTP 401: bad key'

Bundle size reduced by ~20% (removed 1400+ lines of legacy code)

All 171 tests pass.
V
Vacbo committed
9fb977bcab5e580c838d34279278231df814f7d8
Parent: 09863cd