@hasna/microservices 0.0.18 → 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 +84 -0
- package/bin/mcp.js +84 -0
- package/dist/index.js +84 -0
- package/package.json +9 -3
package/bin/index.js
CHANGED
|
@@ -2511,6 +2511,18 @@ var MICROSERVICES = [
|
|
|
2511
2511
|
requiredEnv: ["DATABASE_URL"],
|
|
2512
2512
|
optionalEnv: ["OPENAI_API_KEY", "SEARCH_PORT"]
|
|
2513
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
|
+
},
|
|
2514
2526
|
{
|
|
2515
2527
|
name: "usage",
|
|
2516
2528
|
displayName: "Usage",
|
|
@@ -2558,6 +2570,78 @@ var MICROSERVICES = [
|
|
|
2558
2570
|
tags: ["waitlist", "referral", "invites", "launch", "growth"],
|
|
2559
2571
|
requiredEnv: ["DATABASE_URL"],
|
|
2560
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"]
|
|
2561
2645
|
}
|
|
2562
2646
|
];
|
|
2563
2647
|
function getMicroservice(name) {
|
package/bin/mcp.js
CHANGED
|
@@ -19607,6 +19607,18 @@ var MICROSERVICES = [
|
|
|
19607
19607
|
requiredEnv: ["DATABASE_URL"],
|
|
19608
19608
|
optionalEnv: ["OPENAI_API_KEY", "SEARCH_PORT"]
|
|
19609
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
|
+
},
|
|
19610
19622
|
{
|
|
19611
19623
|
name: "usage",
|
|
19612
19624
|
displayName: "Usage",
|
|
@@ -19654,6 +19666,78 @@ var MICROSERVICES = [
|
|
|
19654
19666
|
tags: ["waitlist", "referral", "invites", "launch", "growth"],
|
|
19655
19667
|
requiredEnv: ["DATABASE_URL"],
|
|
19656
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"]
|
|
19657
19741
|
}
|
|
19658
19742
|
];
|
|
19659
19743
|
function getMicroservice(name) {
|
package/dist/index.js
CHANGED
|
@@ -144,6 +144,18 @@ var MICROSERVICES = [
|
|
|
144
144
|
requiredEnv: ["DATABASE_URL"],
|
|
145
145
|
optionalEnv: ["OPENAI_API_KEY", "SEARCH_PORT"]
|
|
146
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
|
+
},
|
|
147
159
|
{
|
|
148
160
|
name: "usage",
|
|
149
161
|
displayName: "Usage",
|
|
@@ -191,6 +203,78 @@ var MICROSERVICES = [
|
|
|
191
203
|
tags: ["waitlist", "referral", "invites", "launch", "growth"],
|
|
192
204
|
requiredEnv: ["DATABASE_URL"],
|
|
193
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"]
|
|
194
278
|
}
|
|
195
279
|
];
|
|
196
280
|
function getMicroservice(name) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/microservices",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
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",
|
|
@@ -74,7 +74,13 @@
|
|
|
74
74
|
"@hasna/microservice-usage": "^0.0.1",
|
|
75
75
|
"@hasna/microservice-webhooks": "^0.0.1",
|
|
76
76
|
"@hasna/microservice-onboarding": "^0.0.1",
|
|
77
|
-
"@hasna/microservice-waitlist": "^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"
|
|
78
84
|
},
|
|
79
85
|
"engines": {
|
|
80
86
|
"bun": ">=1.0.0"
|