@tekmidian/pai 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/ARCHITECTURE.md +567 -0
  2. package/FEATURE.md +108 -0
  3. package/LICENSE +21 -0
  4. package/README.md +101 -0
  5. package/dist/auto-route-D7W6RE06.mjs +86 -0
  6. package/dist/auto-route-D7W6RE06.mjs.map +1 -0
  7. package/dist/cli/index.d.mts +1 -0
  8. package/dist/cli/index.mjs +5927 -0
  9. package/dist/cli/index.mjs.map +1 -0
  10. package/dist/config-DBh1bYM2.mjs +151 -0
  11. package/dist/config-DBh1bYM2.mjs.map +1 -0
  12. package/dist/daemon/index.d.mts +1 -0
  13. package/dist/daemon/index.mjs +56 -0
  14. package/dist/daemon/index.mjs.map +1 -0
  15. package/dist/daemon-mcp/index.d.mts +1 -0
  16. package/dist/daemon-mcp/index.mjs +185 -0
  17. package/dist/daemon-mcp/index.mjs.map +1 -0
  18. package/dist/daemon-v5O897D4.mjs +773 -0
  19. package/dist/daemon-v5O897D4.mjs.map +1 -0
  20. package/dist/db-4lSqLFb8.mjs +199 -0
  21. package/dist/db-4lSqLFb8.mjs.map +1 -0
  22. package/dist/db-BcDxXVBu.mjs +110 -0
  23. package/dist/db-BcDxXVBu.mjs.map +1 -0
  24. package/dist/detect-BHqYcjJ1.mjs +86 -0
  25. package/dist/detect-BHqYcjJ1.mjs.map +1 -0
  26. package/dist/detector-DKA83aTZ.mjs +74 -0
  27. package/dist/detector-DKA83aTZ.mjs.map +1 -0
  28. package/dist/embeddings-mfqv-jFu.mjs +91 -0
  29. package/dist/embeddings-mfqv-jFu.mjs.map +1 -0
  30. package/dist/factory-BDAiKtYR.mjs +42 -0
  31. package/dist/factory-BDAiKtYR.mjs.map +1 -0
  32. package/dist/index.d.mts +307 -0
  33. package/dist/index.d.mts.map +1 -0
  34. package/dist/index.mjs +11 -0
  35. package/dist/indexer-B20bPHL-.mjs +677 -0
  36. package/dist/indexer-B20bPHL-.mjs.map +1 -0
  37. package/dist/indexer-backend-BXaocO5r.mjs +360 -0
  38. package/dist/indexer-backend-BXaocO5r.mjs.map +1 -0
  39. package/dist/ipc-client-DPy7s3iu.mjs +156 -0
  40. package/dist/ipc-client-DPy7s3iu.mjs.map +1 -0
  41. package/dist/mcp/index.d.mts +1 -0
  42. package/dist/mcp/index.mjs +373 -0
  43. package/dist/mcp/index.mjs.map +1 -0
  44. package/dist/migrate-Bwj7qPaE.mjs +241 -0
  45. package/dist/migrate-Bwj7qPaE.mjs.map +1 -0
  46. package/dist/pai-marker-DX_mFLum.mjs +186 -0
  47. package/dist/pai-marker-DX_mFLum.mjs.map +1 -0
  48. package/dist/postgres-Ccvpc6fC.mjs +335 -0
  49. package/dist/postgres-Ccvpc6fC.mjs.map +1 -0
  50. package/dist/rolldown-runtime-95iHPtFO.mjs +18 -0
  51. package/dist/schemas-DjdwzIQ8.mjs +3405 -0
  52. package/dist/schemas-DjdwzIQ8.mjs.map +1 -0
  53. package/dist/search-PjftDxxs.mjs +282 -0
  54. package/dist/search-PjftDxxs.mjs.map +1 -0
  55. package/dist/sqlite-CHUrNtbI.mjs +90 -0
  56. package/dist/sqlite-CHUrNtbI.mjs.map +1 -0
  57. package/dist/tools-CLK4080-.mjs +805 -0
  58. package/dist/tools-CLK4080-.mjs.map +1 -0
  59. package/dist/utils-DEWdIFQ0.mjs +160 -0
  60. package/dist/utils-DEWdIFQ0.mjs.map +1 -0
  61. package/package.json +72 -0
  62. package/templates/README.md +181 -0
  63. package/templates/agent-prefs.example.md +362 -0
  64. package/templates/claude-md.template.md +733 -0
  65. package/templates/pai-project.template.md +13 -0
  66. package/templates/voices.example.json +251 -0
@@ -0,0 +1,13 @@
1
+ ---
2
+ pai:
3
+ slug: "${SLUG}"
4
+ registered: "${DATE}"
5
+ last_indexed: null
6
+ status: active
7
+ ---
8
+
9
+ # ${DISPLAY_NAME}
10
+
11
+ <!-- Everything below the YAML frontmatter is yours — PAI never modifies content here. -->
12
+ <!-- Use this file for project notes, decisions, preferences, or anything you want. -->
13
+ <!-- PAI only reads and updates the `pai:` block in the frontmatter above. -->
@@ -0,0 +1,251 @@
1
+ {
2
+ "comment": "PAI Voice Configuration Template. Copy to ~/.config/pai/voices.json and customize.",
3
+ "comment_privacy": "This file is NOT committed to any repository. Keep it out of version control.",
4
+
5
+ "voiceSystem": {
6
+ "comment": "Which TTS system to use: 'elevenlabs' or 'kokoro' (local, free)",
7
+ "primary": "kokoro",
8
+ "fallback": "elevenlabs",
9
+ "preferLocal": true
10
+ },
11
+
12
+ "kokoro": {
13
+ "comment": "Kokoro TTS is free, local, and runs entirely on your machine. No API key needed.",
14
+ "available_voices": [
15
+ "af_alloy",
16
+ "af_aoede",
17
+ "af_bella",
18
+ "af_heart",
19
+ "af_jessica",
20
+ "af_kore",
21
+ "af_nicole",
22
+ "af_nova",
23
+ "af_river",
24
+ "af_sarah",
25
+ "af_sky",
26
+ "am_adam",
27
+ "am_echo",
28
+ "am_eric",
29
+ "am_fenrir",
30
+ "am_liam",
31
+ "am_michael",
32
+ "am_onyx",
33
+ "am_puck",
34
+ "am_santa",
35
+ "bf_alice",
36
+ "bf_emma",
37
+ "bf_isabella",
38
+ "bf_lily",
39
+ "bm_daniel",
40
+ "bm_fable",
41
+ "bm_george",
42
+ "bm_lewis"
43
+ ],
44
+ "default": "bm_george",
45
+ "description": "Excellent open-source model, ~160MB download on first use, fully local"
46
+ },
47
+
48
+ "elevenlabs": {
49
+ "comment": "ElevenLabs provides high-quality voices but requires an API key and has usage limits/costs.",
50
+ "apiKey": "${ELEVENLABS_API_KEY}",
51
+ "comment_apikey": "Set via environment variable ELEVENLABS_API_KEY. Sign up at https://elevenlabs.io/",
52
+ "available_voices": {
53
+ "21m00Tcm4TlvDq8ikWAM": "Rachel (US Female)",
54
+ "JBFqnCBsd6RMkjVY3EHl": "Josh (US Male)",
55
+ "EXAVITQu4vr4xnSDxMaL": "Sam (US Male, older)",
56
+ "TX3LPaxmHKxrH7PY1vC3": "Alice (UK Female)",
57
+ "VR6AewLTigWG4xSOukaG": "Chris (UK Male)",
58
+ "pNInz6obpgDQGcFmaJgB": "Adam (US Male)",
59
+ "AZnzlk1XvdvUBZXUNXHP": "Grace (Neutral, calm)",
60
+ "EL13yqQnnW9UWye4EZjE": "Callum (British Male)"
61
+ },
62
+ "default": "21m00Tcm4TlvDq8ikWAM",
63
+ "description": "Higher quality, more natural sounding. Requires API key and has usage limits."
64
+ },
65
+
66
+ "default": {
67
+ "comment": "Default voice for all agents when no specific agent is configured",
68
+ "system": "kokoro",
69
+ "voice": "bm_george"
70
+ },
71
+
72
+ "agents": {
73
+ "comment": "Configure voice for each agent type. Helps distinguish different agent roles.",
74
+
75
+ "main": {
76
+ "comment": "Primary orchestrator agent - general responses and high-level direction",
77
+ "system": "kokoro",
78
+ "voice": "bm_george",
79
+ "description": "Calm, authoritative voice for orchestration decisions"
80
+ },
81
+
82
+ "intern": {
83
+ "comment": "Junior/entry-level agent - quick summaries, status updates, simple tasks",
84
+ "system": "kokoro",
85
+ "voice": "am_adam",
86
+ "description": "Younger, enthusiastic voice for routine tasks"
87
+ },
88
+
89
+ "engineer": {
90
+ "comment": "Software engineering agent - code reviews, implementations, technical details",
91
+ "system": "kokoro",
92
+ "voice": "bm_daniel",
93
+ "description": "Precise, technical voice for engineering discussions"
94
+ },
95
+
96
+ "architect": {
97
+ "comment": "System design agent - high-level architecture, PRDs, strategic planning",
98
+ "system": "kokoro",
99
+ "voice": "bm_lewis",
100
+ "description": "Confident, thoughtful voice for architectural decisions"
101
+ },
102
+
103
+ "researcher": {
104
+ "comment": "Research and analysis agent - findings, summaries, investigations",
105
+ "system": "kokoro",
106
+ "voice": "am_echo",
107
+ "description": "Clear, analytical voice for research findings"
108
+ },
109
+
110
+ "pentester": {
111
+ "comment": "Security testing agent - vulnerability findings, penetration test results",
112
+ "system": "kokoro",
113
+ "voice": "am_eric",
114
+ "description": "Alert, precise voice for security issues"
115
+ }
116
+ },
117
+
118
+ "whatsapp": {
119
+ "comment": "Voice configuration specifically for WhatsApp voice notes (via Whazaa)",
120
+ "enabled": true,
121
+ "default": "bm_george",
122
+ "agents": {
123
+ "main": "bm_george",
124
+ "intern": "am_adam",
125
+ "engineer": "bm_daniel",
126
+ "architect": "bm_lewis",
127
+ "researcher": "am_echo",
128
+ "pentester": "am_eric"
129
+ },
130
+ "description": "These voices are used when responding via WhatsApp voice notes"
131
+ },
132
+
133
+ "local_speakers": {
134
+ "comment": "Voice configuration for local speaker output (macOS, Linux) via Kokoro TTS",
135
+ "enabled": true,
136
+ "default": "bm_george",
137
+ "agents": {
138
+ "main": "bm_george",
139
+ "intern": "am_adam",
140
+ "engineer": "bm_daniel",
141
+ "architect": "bm_lewis",
142
+ "researcher": "am_echo",
143
+ "pentester": "am_eric"
144
+ },
145
+ "speakRate": 1.0,
146
+ "comment_speakrate": "Speed multiplier: 0.8 = slower, 1.0 = normal, 1.2 = faster",
147
+ "description": "These voices are used for local speaker announcements"
148
+ },
149
+
150
+ "personas": {
151
+ "comment": "Optional: Map memorable persona names to voice IDs. Easier to remember than IDs.",
152
+ "Nicole": "af_nicole",
153
+ "George": "bm_george",
154
+ "Daniel": "bm_daniel",
155
+ "Emma": "bf_emma",
156
+ "Lewis": "bm_lewis",
157
+ "Echo": "am_echo",
158
+ "Adam": "am_adam",
159
+ "Bella": "af_bella",
160
+ "Nova": "af_nova",
161
+ "Sarah": "af_sarah"
162
+ },
163
+
164
+ "profiles": {
165
+ "comment": "Named profiles for different use cases. Switch profiles based on context.",
166
+
167
+ "professional": {
168
+ "comment": "Voices for professional/business contexts",
169
+ "default": "bm_lewis",
170
+ "agents": {
171
+ "main": "bm_lewis",
172
+ "engineer": "bm_daniel",
173
+ "architect": "bm_lewis",
174
+ "researcher": "af_nova"
175
+ }
176
+ },
177
+
178
+ "casual": {
179
+ "comment": "Voices for casual/personal projects",
180
+ "default": "am_adam",
181
+ "agents": {
182
+ "main": "am_adam",
183
+ "engineer": "bm_george",
184
+ "architect": "bm_george",
185
+ "researcher": "af_bella"
186
+ }
187
+ },
188
+
189
+ "focus": {
190
+ "comment": "Minimal voices for focused work (fewer distinctions)",
191
+ "default": "bm_george",
192
+ "agents": {
193
+ "main": "bm_george",
194
+ "engineer": "bm_george",
195
+ "architect": "bm_george",
196
+ "researcher": "bm_george"
197
+ }
198
+ }
199
+ },
200
+
201
+ "examples": {
202
+ "comment": "Examples of how to configure different voice setups",
203
+
204
+ "example_all_kokoro": {
205
+ "description": "Use only Kokoro TTS (free, local, no API key)",
206
+ "voiceSystem": {"primary": "kokoro", "fallback": "kokoro", "preferLocal": true},
207
+ "default": {"system": "kokoro", "voice": "bm_george"},
208
+ "agents": {
209
+ "main": {"system": "kokoro", "voice": "bm_george"},
210
+ "engineer": {"system": "kokoro", "voice": "bm_daniel"},
211
+ "architect": {"system": "kokoro", "voice": "bm_lewis"}
212
+ }
213
+ },
214
+
215
+ "example_elevenlabs_premium": {
216
+ "description": "Use ElevenLabs for highest quality voices",
217
+ "voiceSystem": {"primary": "elevenlabs", "fallback": "kokoro", "preferLocal": false},
218
+ "default": {"system": "elevenlabs", "voice": "21m00Tcm4TlvDq8ikWAM"},
219
+ "agents": {
220
+ "main": {"system": "elevenlabs", "voice": "21m00Tcm4TlvDq8ikWAM"},
221
+ "engineer": {"system": "elevenlabs", "voice": "JBFqnCBsd6RMkjVY3EHl"},
222
+ "architect": {"system": "elevenlabs", "voice": "EXAVITQu4vr4xnSDxMaL"}
223
+ }
224
+ },
225
+
226
+ "example_mixed": {
227
+ "description": "Hybrid approach: Kokoro for WhatsApp, ElevenLabs for local speakers",
228
+ "whatsapp": {"enabled": true, "default": "bm_george"},
229
+ "local_speakers": {"enabled": true, "default": "21m00Tcm4TlvDq8ikWAM"}
230
+ }
231
+ },
232
+
233
+ "notes": {
234
+ "setup": "Copy this file to ~/.config/pai/voices.json and customize for your preferences.",
235
+ "kokoro_first_run": "First use downloads ~160MB model (~30 seconds). Runs entirely offline afterward.",
236
+ "elevenlabs_cost": "ElevenLabs has usage limits and costs. Check your account for pricing.",
237
+ "privacy": "This file is NOT committed to version control. Add ~/.config/pai/ to .gitignore.",
238
+ "reloading": "Changes take effect immediately. No daemon restart required.",
239
+ "fallback_behavior": "If primary system fails or voice not found, falls back to alternate system.",
240
+ "environment_variables": "Can also set ELEVENLABS_API_KEY and KOKORO_CACHE_DIR via environment.",
241
+ "testing": "Use 'pai voice test <voice_id>' to preview a voice before setting it as default."
242
+ },
243
+
244
+ "troubleshooting": {
245
+ "kokoro_slow": "First run downloads model (~30s). Subsequent runs are instant and fully local.",
246
+ "elevenlabs_api_error": "Check ELEVENLABS_API_KEY environment variable is set correctly.",
247
+ "voice_not_found": "Verify voice ID exists in available_voices list for chosen TTS system.",
248
+ "whatsapp_silent": "Check Whazaa connection status. WhatsApp may not be connected to phone.",
249
+ "no_sound_local": "Verify 'local_speakers.enabled' is true and system volume is not muted."
250
+ }
251
+ }