@hasna/microservices 0.0.17 → 0.0.19

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.
package/bin/index.js CHANGED
@@ -2474,6 +2474,174 @@ var MICROSERVICES = [
2474
2474
  tags: ["jobs", "queues", "background", "cron", "scheduling", "workers", "retry"],
2475
2475
  requiredEnv: ["DATABASE_URL"],
2476
2476
  optionalEnv: ["JOBS_PORT", "JOBS_WORKER_CONCURRENCY"]
2477
+ },
2478
+ {
2479
+ name: "llm",
2480
+ displayName: "LLM",
2481
+ description: "LLM gateway: multi-provider routing (OpenAI/Anthropic/Groq), per-workspace rate limiting, token cost tracking, response caching, and fallback chains.",
2482
+ category: "AI",
2483
+ package: "@hasna/microservice-llm",
2484
+ binary: "microservice-llm",
2485
+ schemaPrefix: "llm",
2486
+ tags: ["llm", "openai", "anthropic", "groq", "ai", "gateway", "cost-tracking", "rate-limiting"],
2487
+ requiredEnv: ["DATABASE_URL"],
2488
+ optionalEnv: ["OPENAI_API_KEY", "ANTHROPIC_API_KEY", "GROQ_API_KEY", "LLM_PORT"]
2489
+ },
2490
+ {
2491
+ name: "memory",
2492
+ displayName: "Memory",
2493
+ description: "Persistent agent memory with pgvector semantic search, full-text fallback, importance scoring, collections, and per-user/workspace recall.",
2494
+ category: "AI",
2495
+ package: "@hasna/microservice-memory",
2496
+ binary: "microservice-memory",
2497
+ schemaPrefix: "memory",
2498
+ tags: ["memory", "embeddings", "pgvector", "semantic-search", "rag", "ai-agents", "recall"],
2499
+ requiredEnv: ["DATABASE_URL"],
2500
+ optionalEnv: ["OPENAI_API_KEY", "MEMORY_PORT"]
2501
+ },
2502
+ {
2503
+ name: "search",
2504
+ displayName: "Search",
2505
+ description: "Full-text + semantic/vector search (pgvector) across any data collection. Hybrid BM25+cosine scoring. Works without API keys (text-only mode).",
2506
+ category: "AI",
2507
+ package: "@hasna/microservice-search",
2508
+ binary: "microservice-search",
2509
+ schemaPrefix: "search",
2510
+ tags: ["search", "full-text", "semantic", "vector", "pgvector", "hybrid", "rag"],
2511
+ requiredEnv: ["DATABASE_URL"],
2512
+ optionalEnv: ["OPENAI_API_KEY", "SEARCH_PORT"]
2513
+ },
2514
+ {
2515
+ name: "knowledge",
2516
+ displayName: "Knowledge",
2517
+ description: "RAG knowledge base: document ingestion, chunking (fixed/paragraph/sentence/recursive), embedding, and semantic/text/hybrid retrieval with source attribution.",
2518
+ category: "AI",
2519
+ package: "@hasna/microservice-knowledge",
2520
+ binary: "microservice-knowledge",
2521
+ schemaPrefix: "knowledge",
2522
+ tags: ["knowledge", "rag", "chunking", "embeddings", "retrieval", "pgvector", "documents"],
2523
+ requiredEnv: ["DATABASE_URL"],
2524
+ optionalEnv: ["OPENAI_API_KEY", "KNOWLEDGE_PORT"]
2525
+ },
2526
+ {
2527
+ name: "usage",
2528
+ displayName: "Usage",
2529
+ description: "Usage metering for API calls, tokens, storage, or any custom metric. Quota enforcement, daily/monthly aggregates, overage detection.",
2530
+ category: "Observability",
2531
+ package: "@hasna/microservice-usage",
2532
+ binary: "microservice-usage",
2533
+ schemaPrefix: "usage",
2534
+ tags: ["usage", "metering", "quotas", "billing", "limits", "analytics"],
2535
+ requiredEnv: ["DATABASE_URL"],
2536
+ optionalEnv: ["USAGE_PORT"]
2537
+ },
2538
+ {
2539
+ name: "webhooks",
2540
+ displayName: "Webhooks",
2541
+ description: "Reliable outbound webhook delivery with HMAC signing, retries (exponential backoff), delivery logs, and endpoint health tracking.",
2542
+ category: "Infrastructure",
2543
+ package: "@hasna/microservice-webhooks",
2544
+ binary: "microservice-webhooks",
2545
+ schemaPrefix: "webhooks",
2546
+ tags: ["webhooks", "outbound", "delivery", "retry", "signing", "integrations"],
2547
+ requiredEnv: ["DATABASE_URL"],
2548
+ optionalEnv: ["WEBHOOKS_PORT"]
2549
+ },
2550
+ {
2551
+ name: "onboarding",
2552
+ displayName: "Onboarding",
2553
+ description: "User activation flows with checklist step tracking, required vs optional steps, completion percentage, and per-user/workspace progress.",
2554
+ category: "Growth",
2555
+ package: "@hasna/microservice-onboarding",
2556
+ binary: "microservice-onboarding",
2557
+ schemaPrefix: "onboarding",
2558
+ tags: ["onboarding", "activation", "checklists", "flows", "user-journey"],
2559
+ requiredEnv: ["DATABASE_URL"],
2560
+ optionalEnv: ["ONBOARDING_PORT"]
2561
+ },
2562
+ {
2563
+ name: "waitlist",
2564
+ displayName: "Waitlist",
2565
+ description: "Waitlist management with referral codes, priority scoring, batch invite logic, and per-campaign tracking. Standard for AI product launches.",
2566
+ category: "Growth",
2567
+ package: "@hasna/microservice-waitlist",
2568
+ binary: "microservice-waitlist",
2569
+ schemaPrefix: "waitlist",
2570
+ tags: ["waitlist", "referral", "invites", "launch", "growth"],
2571
+ requiredEnv: ["DATABASE_URL"],
2572
+ optionalEnv: ["WAITLIST_PORT"]
2573
+ },
2574
+ {
2575
+ name: "sessions",
2576
+ displayName: "Sessions",
2577
+ description: "AI conversation history: message threads, context window management, multi-turn state, fork/pin, full-text search across messages, export as markdown/JSON.",
2578
+ category: "AI",
2579
+ package: "@hasna/microservice-sessions",
2580
+ binary: "microservice-sessions",
2581
+ schemaPrefix: "sessions",
2582
+ tags: ["sessions", "conversations", "chat", "messages", "context-window", "history"],
2583
+ requiredEnv: ["DATABASE_URL"],
2584
+ optionalEnv: ["SESSIONS_PORT"]
2585
+ },
2586
+ {
2587
+ name: "guardrails",
2588
+ displayName: "Guardrails",
2589
+ description: "AI safety layer: prompt injection detection, PII scanning (email/phone/SSN/CC), toxicity check, configurable per-workspace policies, violation logging.",
2590
+ category: "AI",
2591
+ package: "@hasna/microservice-guardrails",
2592
+ binary: "microservice-guardrails",
2593
+ schemaPrefix: "guardrails",
2594
+ tags: ["guardrails", "safety", "pii", "injection", "toxicity", "moderation", "policy"],
2595
+ requiredEnv: ["DATABASE_URL"],
2596
+ optionalEnv: ["GUARDRAILS_PORT"]
2597
+ },
2598
+ {
2599
+ name: "knowledge",
2600
+ displayName: "Knowledge",
2601
+ description: "RAG pipeline: document ingestion, chunking (fixed/paragraph/sentence/recursive), embedding via pgvector, retrieval with source attribution and scoring.",
2602
+ category: "AI",
2603
+ package: "@hasna/microservice-knowledge",
2604
+ binary: "microservice-knowledge",
2605
+ schemaPrefix: "knowledge",
2606
+ tags: ["knowledge", "rag", "chunking", "ingestion", "retrieval", "documents", "pgvector"],
2607
+ requiredEnv: ["DATABASE_URL"],
2608
+ optionalEnv: ["OPENAI_API_KEY", "KNOWLEDGE_PORT"]
2609
+ },
2610
+ {
2611
+ name: "traces",
2612
+ displayName: "Traces",
2613
+ description: "Agent observability: span-based distributed tracing for LLM calls, tool calls, and decisions. Duration, token, and cost tracking per span. Stats with percentiles.",
2614
+ category: "Observability",
2615
+ package: "@hasna/microservice-traces",
2616
+ binary: "microservice-traces",
2617
+ schemaPrefix: "traces",
2618
+ tags: ["traces", "tracing", "spans", "observability", "latency", "debugging", "agent-ops"],
2619
+ requiredEnv: ["DATABASE_URL"],
2620
+ optionalEnv: ["TRACES_PORT"]
2621
+ },
2622
+ {
2623
+ name: "agents",
2624
+ displayName: "Agents",
2625
+ description: "Agent registry and orchestration: register agents with capabilities, health tracking via heartbeat, capability-based task routing, agent-to-agent messaging.",
2626
+ category: "AI",
2627
+ package: "@hasna/microservice-agents",
2628
+ binary: "microservice-agents",
2629
+ schemaPrefix: "agents",
2630
+ tags: ["agents", "registry", "orchestration", "routing", "multi-agent", "capabilities", "heartbeat"],
2631
+ requiredEnv: ["DATABASE_URL"],
2632
+ optionalEnv: ["AGENTS_PORT"]
2633
+ },
2634
+ {
2635
+ name: "prompts",
2636
+ displayName: "Prompts",
2637
+ description: "Versioned prompt management: auto-incrementing versions, per-workspace/user/agent overrides, A/B experiment variants, rollback, variable interpolation, diff.",
2638
+ category: "AI",
2639
+ package: "@hasna/microservice-prompts",
2640
+ binary: "microservice-prompts",
2641
+ schemaPrefix: "prompts",
2642
+ tags: ["prompts", "templates", "versioning", "ab-testing", "overrides", "rollback"],
2643
+ requiredEnv: ["DATABASE_URL"],
2644
+ optionalEnv: ["PROMPTS_PORT"]
2477
2645
  }
2478
2646
  ];
2479
2647
  function getMicroservice(name) {
package/bin/mcp.js CHANGED
@@ -19570,6 +19570,174 @@ var MICROSERVICES = [
19570
19570
  tags: ["jobs", "queues", "background", "cron", "scheduling", "workers", "retry"],
19571
19571
  requiredEnv: ["DATABASE_URL"],
19572
19572
  optionalEnv: ["JOBS_PORT", "JOBS_WORKER_CONCURRENCY"]
19573
+ },
19574
+ {
19575
+ name: "llm",
19576
+ displayName: "LLM",
19577
+ description: "LLM gateway: multi-provider routing (OpenAI/Anthropic/Groq), per-workspace rate limiting, token cost tracking, response caching, and fallback chains.",
19578
+ category: "AI",
19579
+ package: "@hasna/microservice-llm",
19580
+ binary: "microservice-llm",
19581
+ schemaPrefix: "llm",
19582
+ tags: ["llm", "openai", "anthropic", "groq", "ai", "gateway", "cost-tracking", "rate-limiting"],
19583
+ requiredEnv: ["DATABASE_URL"],
19584
+ optionalEnv: ["OPENAI_API_KEY", "ANTHROPIC_API_KEY", "GROQ_API_KEY", "LLM_PORT"]
19585
+ },
19586
+ {
19587
+ name: "memory",
19588
+ displayName: "Memory",
19589
+ description: "Persistent agent memory with pgvector semantic search, full-text fallback, importance scoring, collections, and per-user/workspace recall.",
19590
+ category: "AI",
19591
+ package: "@hasna/microservice-memory",
19592
+ binary: "microservice-memory",
19593
+ schemaPrefix: "memory",
19594
+ tags: ["memory", "embeddings", "pgvector", "semantic-search", "rag", "ai-agents", "recall"],
19595
+ requiredEnv: ["DATABASE_URL"],
19596
+ optionalEnv: ["OPENAI_API_KEY", "MEMORY_PORT"]
19597
+ },
19598
+ {
19599
+ name: "search",
19600
+ displayName: "Search",
19601
+ description: "Full-text + semantic/vector search (pgvector) across any data collection. Hybrid BM25+cosine scoring. Works without API keys (text-only mode).",
19602
+ category: "AI",
19603
+ package: "@hasna/microservice-search",
19604
+ binary: "microservice-search",
19605
+ schemaPrefix: "search",
19606
+ tags: ["search", "full-text", "semantic", "vector", "pgvector", "hybrid", "rag"],
19607
+ requiredEnv: ["DATABASE_URL"],
19608
+ optionalEnv: ["OPENAI_API_KEY", "SEARCH_PORT"]
19609
+ },
19610
+ {
19611
+ name: "knowledge",
19612
+ displayName: "Knowledge",
19613
+ description: "RAG knowledge base: document ingestion, chunking (fixed/paragraph/sentence/recursive), embedding, and semantic/text/hybrid retrieval with source attribution.",
19614
+ category: "AI",
19615
+ package: "@hasna/microservice-knowledge",
19616
+ binary: "microservice-knowledge",
19617
+ schemaPrefix: "knowledge",
19618
+ tags: ["knowledge", "rag", "chunking", "embeddings", "retrieval", "pgvector", "documents"],
19619
+ requiredEnv: ["DATABASE_URL"],
19620
+ optionalEnv: ["OPENAI_API_KEY", "KNOWLEDGE_PORT"]
19621
+ },
19622
+ {
19623
+ name: "usage",
19624
+ displayName: "Usage",
19625
+ description: "Usage metering for API calls, tokens, storage, or any custom metric. Quota enforcement, daily/monthly aggregates, overage detection.",
19626
+ category: "Observability",
19627
+ package: "@hasna/microservice-usage",
19628
+ binary: "microservice-usage",
19629
+ schemaPrefix: "usage",
19630
+ tags: ["usage", "metering", "quotas", "billing", "limits", "analytics"],
19631
+ requiredEnv: ["DATABASE_URL"],
19632
+ optionalEnv: ["USAGE_PORT"]
19633
+ },
19634
+ {
19635
+ name: "webhooks",
19636
+ displayName: "Webhooks",
19637
+ description: "Reliable outbound webhook delivery with HMAC signing, retries (exponential backoff), delivery logs, and endpoint health tracking.",
19638
+ category: "Infrastructure",
19639
+ package: "@hasna/microservice-webhooks",
19640
+ binary: "microservice-webhooks",
19641
+ schemaPrefix: "webhooks",
19642
+ tags: ["webhooks", "outbound", "delivery", "retry", "signing", "integrations"],
19643
+ requiredEnv: ["DATABASE_URL"],
19644
+ optionalEnv: ["WEBHOOKS_PORT"]
19645
+ },
19646
+ {
19647
+ name: "onboarding",
19648
+ displayName: "Onboarding",
19649
+ description: "User activation flows with checklist step tracking, required vs optional steps, completion percentage, and per-user/workspace progress.",
19650
+ category: "Growth",
19651
+ package: "@hasna/microservice-onboarding",
19652
+ binary: "microservice-onboarding",
19653
+ schemaPrefix: "onboarding",
19654
+ tags: ["onboarding", "activation", "checklists", "flows", "user-journey"],
19655
+ requiredEnv: ["DATABASE_URL"],
19656
+ optionalEnv: ["ONBOARDING_PORT"]
19657
+ },
19658
+ {
19659
+ name: "waitlist",
19660
+ displayName: "Waitlist",
19661
+ description: "Waitlist management with referral codes, priority scoring, batch invite logic, and per-campaign tracking. Standard for AI product launches.",
19662
+ category: "Growth",
19663
+ package: "@hasna/microservice-waitlist",
19664
+ binary: "microservice-waitlist",
19665
+ schemaPrefix: "waitlist",
19666
+ tags: ["waitlist", "referral", "invites", "launch", "growth"],
19667
+ requiredEnv: ["DATABASE_URL"],
19668
+ optionalEnv: ["WAITLIST_PORT"]
19669
+ },
19670
+ {
19671
+ name: "sessions",
19672
+ displayName: "Sessions",
19673
+ description: "AI conversation history: message threads, context window management, multi-turn state, fork/pin, full-text search across messages, export as markdown/JSON.",
19674
+ category: "AI",
19675
+ package: "@hasna/microservice-sessions",
19676
+ binary: "microservice-sessions",
19677
+ schemaPrefix: "sessions",
19678
+ tags: ["sessions", "conversations", "chat", "messages", "context-window", "history"],
19679
+ requiredEnv: ["DATABASE_URL"],
19680
+ optionalEnv: ["SESSIONS_PORT"]
19681
+ },
19682
+ {
19683
+ name: "guardrails",
19684
+ displayName: "Guardrails",
19685
+ description: "AI safety layer: prompt injection detection, PII scanning (email/phone/SSN/CC), toxicity check, configurable per-workspace policies, violation logging.",
19686
+ category: "AI",
19687
+ package: "@hasna/microservice-guardrails",
19688
+ binary: "microservice-guardrails",
19689
+ schemaPrefix: "guardrails",
19690
+ tags: ["guardrails", "safety", "pii", "injection", "toxicity", "moderation", "policy"],
19691
+ requiredEnv: ["DATABASE_URL"],
19692
+ optionalEnv: ["GUARDRAILS_PORT"]
19693
+ },
19694
+ {
19695
+ name: "knowledge",
19696
+ displayName: "Knowledge",
19697
+ description: "RAG pipeline: document ingestion, chunking (fixed/paragraph/sentence/recursive), embedding via pgvector, retrieval with source attribution and scoring.",
19698
+ category: "AI",
19699
+ package: "@hasna/microservice-knowledge",
19700
+ binary: "microservice-knowledge",
19701
+ schemaPrefix: "knowledge",
19702
+ tags: ["knowledge", "rag", "chunking", "ingestion", "retrieval", "documents", "pgvector"],
19703
+ requiredEnv: ["DATABASE_URL"],
19704
+ optionalEnv: ["OPENAI_API_KEY", "KNOWLEDGE_PORT"]
19705
+ },
19706
+ {
19707
+ name: "traces",
19708
+ displayName: "Traces",
19709
+ description: "Agent observability: span-based distributed tracing for LLM calls, tool calls, and decisions. Duration, token, and cost tracking per span. Stats with percentiles.",
19710
+ category: "Observability",
19711
+ package: "@hasna/microservice-traces",
19712
+ binary: "microservice-traces",
19713
+ schemaPrefix: "traces",
19714
+ tags: ["traces", "tracing", "spans", "observability", "latency", "debugging", "agent-ops"],
19715
+ requiredEnv: ["DATABASE_URL"],
19716
+ optionalEnv: ["TRACES_PORT"]
19717
+ },
19718
+ {
19719
+ name: "agents",
19720
+ displayName: "Agents",
19721
+ description: "Agent registry and orchestration: register agents with capabilities, health tracking via heartbeat, capability-based task routing, agent-to-agent messaging.",
19722
+ category: "AI",
19723
+ package: "@hasna/microservice-agents",
19724
+ binary: "microservice-agents",
19725
+ schemaPrefix: "agents",
19726
+ tags: ["agents", "registry", "orchestration", "routing", "multi-agent", "capabilities", "heartbeat"],
19727
+ requiredEnv: ["DATABASE_URL"],
19728
+ optionalEnv: ["AGENTS_PORT"]
19729
+ },
19730
+ {
19731
+ name: "prompts",
19732
+ displayName: "Prompts",
19733
+ description: "Versioned prompt management: auto-incrementing versions, per-workspace/user/agent overrides, A/B experiment variants, rollback, variable interpolation, diff.",
19734
+ category: "AI",
19735
+ package: "@hasna/microservice-prompts",
19736
+ binary: "microservice-prompts",
19737
+ schemaPrefix: "prompts",
19738
+ tags: ["prompts", "templates", "versioning", "ab-testing", "overrides", "rollback"],
19739
+ requiredEnv: ["DATABASE_URL"],
19740
+ optionalEnv: ["PROMPTS_PORT"]
19573
19741
  }
19574
19742
  ];
19575
19743
  function getMicroservice(name) {
package/dist/index.js CHANGED
@@ -8,7 +8,8 @@ var CATEGORIES = [
8
8
  "Storage",
9
9
  "Observability",
10
10
  "Growth",
11
- "Infrastructure"
11
+ "Infrastructure",
12
+ "AI"
12
13
  ];
13
14
  var MICROSERVICES = [
14
15
  {
@@ -106,6 +107,174 @@ var MICROSERVICES = [
106
107
  tags: ["jobs", "queues", "background", "cron", "scheduling", "workers", "retry"],
107
108
  requiredEnv: ["DATABASE_URL"],
108
109
  optionalEnv: ["JOBS_PORT", "JOBS_WORKER_CONCURRENCY"]
110
+ },
111
+ {
112
+ name: "llm",
113
+ displayName: "LLM",
114
+ description: "LLM gateway: multi-provider routing (OpenAI/Anthropic/Groq), per-workspace rate limiting, token cost tracking, response caching, and fallback chains.",
115
+ category: "AI",
116
+ package: "@hasna/microservice-llm",
117
+ binary: "microservice-llm",
118
+ schemaPrefix: "llm",
119
+ tags: ["llm", "openai", "anthropic", "groq", "ai", "gateway", "cost-tracking", "rate-limiting"],
120
+ requiredEnv: ["DATABASE_URL"],
121
+ optionalEnv: ["OPENAI_API_KEY", "ANTHROPIC_API_KEY", "GROQ_API_KEY", "LLM_PORT"]
122
+ },
123
+ {
124
+ name: "memory",
125
+ displayName: "Memory",
126
+ description: "Persistent agent memory with pgvector semantic search, full-text fallback, importance scoring, collections, and per-user/workspace recall.",
127
+ category: "AI",
128
+ package: "@hasna/microservice-memory",
129
+ binary: "microservice-memory",
130
+ schemaPrefix: "memory",
131
+ tags: ["memory", "embeddings", "pgvector", "semantic-search", "rag", "ai-agents", "recall"],
132
+ requiredEnv: ["DATABASE_URL"],
133
+ optionalEnv: ["OPENAI_API_KEY", "MEMORY_PORT"]
134
+ },
135
+ {
136
+ name: "search",
137
+ displayName: "Search",
138
+ description: "Full-text + semantic/vector search (pgvector) across any data collection. Hybrid BM25+cosine scoring. Works without API keys (text-only mode).",
139
+ category: "AI",
140
+ package: "@hasna/microservice-search",
141
+ binary: "microservice-search",
142
+ schemaPrefix: "search",
143
+ tags: ["search", "full-text", "semantic", "vector", "pgvector", "hybrid", "rag"],
144
+ requiredEnv: ["DATABASE_URL"],
145
+ optionalEnv: ["OPENAI_API_KEY", "SEARCH_PORT"]
146
+ },
147
+ {
148
+ name: "knowledge",
149
+ displayName: "Knowledge",
150
+ description: "RAG knowledge base: document ingestion, chunking (fixed/paragraph/sentence/recursive), embedding, and semantic/text/hybrid retrieval with source attribution.",
151
+ category: "AI",
152
+ package: "@hasna/microservice-knowledge",
153
+ binary: "microservice-knowledge",
154
+ schemaPrefix: "knowledge",
155
+ tags: ["knowledge", "rag", "chunking", "embeddings", "retrieval", "pgvector", "documents"],
156
+ requiredEnv: ["DATABASE_URL"],
157
+ optionalEnv: ["OPENAI_API_KEY", "KNOWLEDGE_PORT"]
158
+ },
159
+ {
160
+ name: "usage",
161
+ displayName: "Usage",
162
+ description: "Usage metering for API calls, tokens, storage, or any custom metric. Quota enforcement, daily/monthly aggregates, overage detection.",
163
+ category: "Observability",
164
+ package: "@hasna/microservice-usage",
165
+ binary: "microservice-usage",
166
+ schemaPrefix: "usage",
167
+ tags: ["usage", "metering", "quotas", "billing", "limits", "analytics"],
168
+ requiredEnv: ["DATABASE_URL"],
169
+ optionalEnv: ["USAGE_PORT"]
170
+ },
171
+ {
172
+ name: "webhooks",
173
+ displayName: "Webhooks",
174
+ description: "Reliable outbound webhook delivery with HMAC signing, retries (exponential backoff), delivery logs, and endpoint health tracking.",
175
+ category: "Infrastructure",
176
+ package: "@hasna/microservice-webhooks",
177
+ binary: "microservice-webhooks",
178
+ schemaPrefix: "webhooks",
179
+ tags: ["webhooks", "outbound", "delivery", "retry", "signing", "integrations"],
180
+ requiredEnv: ["DATABASE_URL"],
181
+ optionalEnv: ["WEBHOOKS_PORT"]
182
+ },
183
+ {
184
+ name: "onboarding",
185
+ displayName: "Onboarding",
186
+ description: "User activation flows with checklist step tracking, required vs optional steps, completion percentage, and per-user/workspace progress.",
187
+ category: "Growth",
188
+ package: "@hasna/microservice-onboarding",
189
+ binary: "microservice-onboarding",
190
+ schemaPrefix: "onboarding",
191
+ tags: ["onboarding", "activation", "checklists", "flows", "user-journey"],
192
+ requiredEnv: ["DATABASE_URL"],
193
+ optionalEnv: ["ONBOARDING_PORT"]
194
+ },
195
+ {
196
+ name: "waitlist",
197
+ displayName: "Waitlist",
198
+ description: "Waitlist management with referral codes, priority scoring, batch invite logic, and per-campaign tracking. Standard for AI product launches.",
199
+ category: "Growth",
200
+ package: "@hasna/microservice-waitlist",
201
+ binary: "microservice-waitlist",
202
+ schemaPrefix: "waitlist",
203
+ tags: ["waitlist", "referral", "invites", "launch", "growth"],
204
+ requiredEnv: ["DATABASE_URL"],
205
+ optionalEnv: ["WAITLIST_PORT"]
206
+ },
207
+ {
208
+ name: "sessions",
209
+ displayName: "Sessions",
210
+ description: "AI conversation history: message threads, context window management, multi-turn state, fork/pin, full-text search across messages, export as markdown/JSON.",
211
+ category: "AI",
212
+ package: "@hasna/microservice-sessions",
213
+ binary: "microservice-sessions",
214
+ schemaPrefix: "sessions",
215
+ tags: ["sessions", "conversations", "chat", "messages", "context-window", "history"],
216
+ requiredEnv: ["DATABASE_URL"],
217
+ optionalEnv: ["SESSIONS_PORT"]
218
+ },
219
+ {
220
+ name: "guardrails",
221
+ displayName: "Guardrails",
222
+ description: "AI safety layer: prompt injection detection, PII scanning (email/phone/SSN/CC), toxicity check, configurable per-workspace policies, violation logging.",
223
+ category: "AI",
224
+ package: "@hasna/microservice-guardrails",
225
+ binary: "microservice-guardrails",
226
+ schemaPrefix: "guardrails",
227
+ tags: ["guardrails", "safety", "pii", "injection", "toxicity", "moderation", "policy"],
228
+ requiredEnv: ["DATABASE_URL"],
229
+ optionalEnv: ["GUARDRAILS_PORT"]
230
+ },
231
+ {
232
+ name: "knowledge",
233
+ displayName: "Knowledge",
234
+ description: "RAG pipeline: document ingestion, chunking (fixed/paragraph/sentence/recursive), embedding via pgvector, retrieval with source attribution and scoring.",
235
+ category: "AI",
236
+ package: "@hasna/microservice-knowledge",
237
+ binary: "microservice-knowledge",
238
+ schemaPrefix: "knowledge",
239
+ tags: ["knowledge", "rag", "chunking", "ingestion", "retrieval", "documents", "pgvector"],
240
+ requiredEnv: ["DATABASE_URL"],
241
+ optionalEnv: ["OPENAI_API_KEY", "KNOWLEDGE_PORT"]
242
+ },
243
+ {
244
+ name: "traces",
245
+ displayName: "Traces",
246
+ description: "Agent observability: span-based distributed tracing for LLM calls, tool calls, and decisions. Duration, token, and cost tracking per span. Stats with percentiles.",
247
+ category: "Observability",
248
+ package: "@hasna/microservice-traces",
249
+ binary: "microservice-traces",
250
+ schemaPrefix: "traces",
251
+ tags: ["traces", "tracing", "spans", "observability", "latency", "debugging", "agent-ops"],
252
+ requiredEnv: ["DATABASE_URL"],
253
+ optionalEnv: ["TRACES_PORT"]
254
+ },
255
+ {
256
+ name: "agents",
257
+ displayName: "Agents",
258
+ description: "Agent registry and orchestration: register agents with capabilities, health tracking via heartbeat, capability-based task routing, agent-to-agent messaging.",
259
+ category: "AI",
260
+ package: "@hasna/microservice-agents",
261
+ binary: "microservice-agents",
262
+ schemaPrefix: "agents",
263
+ tags: ["agents", "registry", "orchestration", "routing", "multi-agent", "capabilities", "heartbeat"],
264
+ requiredEnv: ["DATABASE_URL"],
265
+ optionalEnv: ["AGENTS_PORT"]
266
+ },
267
+ {
268
+ name: "prompts",
269
+ displayName: "Prompts",
270
+ description: "Versioned prompt management: auto-incrementing versions, per-workspace/user/agent overrides, A/B experiment variants, rollback, variable interpolation, diff.",
271
+ category: "AI",
272
+ package: "@hasna/microservice-prompts",
273
+ binary: "microservice-prompts",
274
+ schemaPrefix: "prompts",
275
+ tags: ["prompts", "templates", "versioning", "ab-testing", "overrides", "rollback"],
276
+ requiredEnv: ["DATABASE_URL"],
277
+ optionalEnv: ["PROMPTS_PORT"]
109
278
  }
110
279
  ];
111
280
  function getMicroservice(name) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hasna/microservices",
3
- "version": "0.0.17",
4
- "description": "Production-grade microservice building blocks for SaaS apps — auth, teams, billing, notify, files, audit, flags, jobs. Each with PostgreSQL, HTTP API, MCP server, and CLI.",
3
+ "version": "0.0.19",
4
+ "description": "21 production-grade microservice building blocks for AI-native SaaS — auth, billing, LLM gateway, agent registry, RAG, guardrails, tracing, and more. Each with PostgreSQL, HTTP API, MCP server, and CLI.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "microservices": "./bin/index.js",
@@ -32,16 +32,19 @@
32
32
  "keywords": [
33
33
  "microservices",
34
34
  "saas",
35
+ "ai-agents",
35
36
  "auth",
36
37
  "billing",
37
38
  "stripe",
38
39
  "postgresql",
40
+ "pgvector",
41
+ "llm-gateway",
39
42
  "feature-flags",
40
43
  "background-jobs",
44
+ "vector-search",
41
45
  "mcp",
42
46
  "model-context-protocol",
43
47
  "ai",
44
- "agent",
45
48
  "cli"
46
49
  ],
47
50
  "author": "Hasna",
@@ -64,7 +67,20 @@
64
67
  "@hasna/microservice-files": "^0.0.1",
65
68
  "@hasna/microservice-audit": "^0.0.1",
66
69
  "@hasna/microservice-flags": "^0.0.1",
67
- "@hasna/microservice-jobs": "^0.0.1"
70
+ "@hasna/microservice-jobs": "^0.0.1",
71
+ "@hasna/microservice-llm": "^0.0.1",
72
+ "@hasna/microservice-memory": "^0.0.1",
73
+ "@hasna/microservice-search": "^0.0.1",
74
+ "@hasna/microservice-usage": "^0.0.1",
75
+ "@hasna/microservice-webhooks": "^0.0.1",
76
+ "@hasna/microservice-onboarding": "^0.0.1",
77
+ "@hasna/microservice-waitlist": "^0.0.1",
78
+ "@hasna/microservice-sessions": "^0.0.1",
79
+ "@hasna/microservice-guardrails": "^0.0.1",
80
+ "@hasna/microservice-knowledge": "^0.0.1",
81
+ "@hasna/microservice-traces": "^0.0.1",
82
+ "@hasna/microservice-agents": "^0.0.1",
83
+ "@hasna/microservice-prompts": "^0.0.1"
68
84
  },
69
85
  "engines": {
70
86
  "bun": ">=1.0.0"