feat(canary): Zod schemas + canary envelope error normalization
- Add Zod 4 schemas mirroring backend handler shapes:
- api/types/token.ts: tokenResponseSchema, manageTokenViewSchema,
artifactSchema (discriminatedUnion on kind), typeDescriptorSchema,
createTokenRequestSchema (with superRefine for telegram/webhook
conditional required), per-type metadata helpers.
- api/types/event.ts: eventResponseSchema with GeoView, NotifyStatus,
manageResponseSchema with cursor pagination.
- api/types/error.ts: apiErrorEnvelopeSchema (canary {success,error}
envelope) + successEnvelope<T> factory for typed unwrap.
- Refactor core/api/errors.ts: ApiError now carries canary error codes
(VALIDATION_ERROR, TURNSTILE_FAILED, BAD_CURSOR, etc.) and a
fields: Record<string,string> map. transformAxiosError parses the
canary envelope first, falls back to HTTP status code if envelope
shape is missing.
- Update core/api/query.config.ts no-retry list for canary codes
(user-error codes plus RATE_LIMITED to avoid burning rate budget).
- Remove obsolete template apiClient at core/api/api.config.ts; the
new canary client lives at api/client.ts (Phase 14 next commit).