- Add 36-02-SUMMARY.md with task details and verification results - Advance STATE.md to plan 2 of 3, 33% progress - Update ROADMAP.md plan progress (1 of 3 summaries) - Mark VPIPE-05 as complete in REQUIREMENTS.md
4.3 KiB
4.3 KiB
| phase | plan | subsystem | tags | dependency_graph | tech_stack | key_files | decisions | metrics | requirements_completed | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 36-voice-pipeline-foundation | 02 | shared-validators |
|
|
|
|
|
|
|
Phase 36 Plan 02: Voice Schema Foundation Summary
One-liner: voiceMode enum field added to createMessageSchema and ChatMessage, plus nexus-settings extended with voiceMode (default "text"), telegramToken, piperBinaryPath, and whisperBinaryPath.
Completed Tasks
| Task | Name | Commit | Files |
|---|---|---|---|
| 1 | Extend shared validators and types with voiceMode field | 390034c7 |
packages/shared/src/validators/chat.ts, packages/shared/src/types/chat.ts, server/src/tests/36-voice-schema.test.ts |
| 2 | Extend nexus-settings schema with voiceMode and telegramToken | 044e3dad |
server/src/services/nexus-settings.ts, server/src/tests/36-voice-schema.test.ts |
What Was Built
packages/shared/src/validators/chat.ts
Added VOICE_MODES constant, VoiceMode type, and optional voiceMode field to createMessageSchema:
export const VOICE_MODES = ["text", "voice_input", "full_voice"] as const;
export type VoiceMode = (typeof VOICE_MODES)[number];
// In createMessageSchema:
voiceMode: z.enum(VOICE_MODES).optional(),
packages/shared/src/types/chat.ts
Added optional voiceMode field to ChatMessage interface:
voiceMode?: "text" | "voice_input" | "full_voice" | null;
server/src/services/nexus-settings.ts
Extended nexusSettingsSchema with four new fields, exported the schema for testing, updated fallback logic:
export const nexusSettingsSchema = z.object({
mode: z.enum(NEXUS_MODES).default("both"),
voiceEnabled: z.boolean().default(false),
voiceMode: z.enum(VOICE_MODES).default("text"),
telegramToken: z.string().optional(),
piperBinaryPath: z.string().optional(),
whisperBinaryPath: z.string().optional(),
});
server/src/tests/36-voice-schema.test.ts
11 tests covering:
- createMessageSchema voiceMode enum validation (6 tests)
- nexusSettingsSchema voiceMode defaults and telegramToken (5 tests)
Verification
All verification checks pass:
pnpm --filter @paperclipai/server test --runexits 0 for 36-voice-schema.test.ts (11/11 tests)grep "voiceMode" packages/shared/src/validators/chat.tsshows the fieldgrep "voiceMode" packages/shared/src/types/chat.tsshows the fieldgrep "voiceMode" server/src/services/nexus-settings.tsshows the fieldgrep "telegramToken" server/src/services/nexus-settings.tsshows the field
Deviations from Plan
None — plan executed exactly as written.
Known Stubs
None — this plan adds schema/type foundations only. No UI rendering or data flow is introduced.
Self-Check: PASSED
- packages/shared/src/validators/chat.ts — FOUND, contains voiceMode
- packages/shared/src/types/chat.ts — FOUND, contains voiceMode
- server/src/services/nexus-settings.ts — FOUND, contains voiceMode and telegramToken
- server/src/tests/36-voice-schema.test.ts — FOUND, 11 passing tests
- Commit
390034c7— FOUND - Commit
044e3dad— FOUND