diff --git a/SERVICES.md b/SERVICES.md index 3985e1f..7eeb9dd 100644 --- a/SERVICES.md +++ b/SERVICES.md @@ -48,7 +48,7 @@ apex/`ns` host and isn't listed within it. Each implemented worker has its own | Notifications | `notify` | `notify` | Real-time notifications over SignalR/WebSockets (Durable Object) | | PlatformNotifications | `platformnotifications` | `platformnotifications` | Stub — deploys and answers, no notification endpoints yet | | PlayerSettings | `playersettings` | `playersettings` | Per-player settings (KV) | -| RoomComments | `roomcomments` | — | Not yet implemented | +| RoomComments | `roomcomments` | `roomcomments` | Stub — deploys and answers, no comment endpoints yet | | RoomieIntegrations | `roomieintegrations` | — | Not yet implemented | | Rooms | `rooms` | `rooms` | Room storage & queries; seeds the Dorm & Orientation rooms (D1) | | Storage | `storage` | — | Room uploader | diff --git a/apps/moderation/src/moderation.app.ts b/apps/moderation/src/moderation.app.ts index a562b1f..c42dc56 100644 --- a/apps/moderation/src/moderation.app.ts +++ b/apps/moderation/src/moderation.app.ts @@ -23,4 +23,16 @@ const app = new Hono() return c.text('hello, world!') }) + // Voice-moderation vendor credentials. The client fetches these while setting up voice + // so it can talk to the moderation vendor DIRECTLY — the audio never passes through this + // service, which is why the credentials are handed out rather than used server-side. + // + // Both are deliberately EMPTY: no vendor account is wired up here, and the client treats + // blank credentials as "voice moderation is off" instead of failing voice setup. The keys + // must still be present and strings — a missing key or a null trips the client's parser. + // Note `AccountId` is a STRING even though it reads as a number. + .get('/voice/config', (c) => { + return c.json({ AccountId: '', ApiKey: '' }) + }) + export default app diff --git a/apps/moderation/src/test/integration/api.test.ts b/apps/moderation/src/test/integration/api.test.ts index 47bcb0a..e34dd62 100644 --- a/apps/moderation/src/test/integration/api.test.ts +++ b/apps/moderation/src/test/integration/api.test.ts @@ -6,3 +6,9 @@ it('response with hello world', async () => { expect(res.status).toBe(200) expect(await res.text()).toMatchInlineSnapshot(`"hello, world!"`) }) + +it('serves empty voice moderation credentials', async () => { + const res = await SELF.fetch('https://example.com/voice/config') + expect(res.status).toBe(200) + expect(await res.json()).toEqual({ AccountId: '', ApiKey: '' }) +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e8e7a79..be85981 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -987,6 +987,37 @@ importers: specifier: 4.105.0 version: 4.105.0(@cloudflare/workers-types@4.20260630.1) + apps/roomcomments: + dependencies: + '@repo/hono-helpers': + specifier: workspace:* + version: link:../../packages/hono-helpers + hono: + specifier: 4.12.27 + version: 4.12.27 + workers-tagged-logger: + specifier: 1.0.1 + version: 1.0.1 + devDependencies: + '@cloudflare/vitest-pool-workers': + specifier: 0.16.20 + version: 0.16.20(@cloudflare/workers-types@4.20260630.1)(@vitest/runner@4.1.9)(@vitest/snapshot@4.1.9)(vitest@4.1.9(@opentelemetry/api@1.9.0)(@types/node@26.0.1)(vite@6.4.3(@types/node@26.0.1)(jiti@2.6.1)(lightningcss@1.29.2)(tsx@4.22.4)(yaml@2.9.0))) + '@repo/tools': + specifier: workspace:* + version: link:../../packages/tools + '@repo/typescript-config': + specifier: workspace:* + version: link:../../packages/typescript-config + '@types/node': + specifier: 26.0.1 + version: 26.0.1 + vitest: + specifier: 4.1.9 + version: 4.1.9(@opentelemetry/api@1.9.0)(@types/node@26.0.1)(vite@6.4.3(@types/node@26.0.1)(jiti@2.6.1)(lightningcss@1.29.2)(tsx@4.22.4)(yaml@2.9.0)) + wrangler: + specifier: 4.105.0 + version: 4.105.0(@cloudflare/workers-types@4.20260630.1) + apps/rooms: dependencies: '@repo/domain':