Merge origin/main into overhaul

Both sides added upstream client-identification headers independently.
Keep the overhaul's client (caching now lives in workshop-cache.ts, so
the in-client preview cache and its TTL are gone) and adopt origin's
identity string 'reforger.dzr.tools'. Origin's header test is kept,
retargeted from the removed health() onto search().

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017iyv7BRFwX5nGqY5uV91Uu
This commit is contained in:
SowinskiBraedenandClaude Opus 5 committed 2026-09-05 13:12:58 -07:00
commit 7493459b17
2 files changed
+16 -1

No files matched your search

@@ -120,6 +120,21 @@ describe('localizedLabel', () => {
}); });
describe('WorkshopClient (v2)', () => { describe('WorkshopClient (v2)', () => {
it('identifies panel traffic to the upstream API', async () => {
const { client: workshop, fetchImpl } = client(() => listResponse());
await workshop.search({});
expect(fetchImpl).toHaveBeenCalledWith(
expect.any(String),
expect.objectContaining({
headers: expect.objectContaining({
'User-Agent': 'reforger.dzr.tools',
'X-API-Client': 'reforger.dzr.tools',
}),
}),
);
});
it('maps search results with typed sizes and ratings', async () => { it('maps search results with typed sizes and ratings', async () => {
const { client: workshop, fetchImpl } = client(() => listResponse()); const { client: workshop, fetchImpl } = client(() => listResponse());
const result = await workshop.search({ const result = await workshop.search({
@@ -32,7 +32,7 @@ import { ApiError } from '../../lib/errors.js';
*/ */
/** Identifies the panel to the upstream, as its docs request. */ /** Identifies the panel to the upstream, as its docs request. */
const CLIENT_NAME = 'reforger-panel'; const CLIENT_NAME = 'reforger.dzr.tools';
// ---------- upstream schemas ---------- // ---------- upstream schemas ----------