prism-mcp-server 20.0.0 → 20.0.1
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.
|
@@ -640,8 +640,12 @@ export async function sessionLoadContextHandler(args) {
|
|
|
640
640
|
try {
|
|
641
641
|
const { resolveSkills: resolveForFresh } = await import("./skillRouting.js");
|
|
642
642
|
const freshResolution = await resolveForFresh(project);
|
|
643
|
-
|
|
644
|
-
|
|
643
|
+
// Client-renders-content: load from local DB by resolved names
|
|
644
|
+
for (const name of freshResolution.names || []) {
|
|
645
|
+
const content = await getSetting(`skill:${name}`, "");
|
|
646
|
+
if (content?.trim()) {
|
|
647
|
+
freshSkillBlock += `\n\n[📜 SKILL: ${name}]\n${content.trim()}`;
|
|
648
|
+
}
|
|
645
649
|
}
|
|
646
650
|
// Offline fallback: load protected skills from local DB
|
|
647
651
|
if (freshResolution.isOffline) {
|
|
@@ -929,14 +933,19 @@ export async function sessionLoadContextHandler(args) {
|
|
|
929
933
|
return "";
|
|
930
934
|
} });
|
|
931
935
|
const skillResolution = await resolveSkills(project, prompt, effectiveRole);
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
936
|
+
// Client-renders-content: portal returns names, we load content from local DB
|
|
937
|
+
for (const name of skillResolution.names || []) {
|
|
938
|
+
if (loadedSkills.includes(name))
|
|
939
|
+
continue;
|
|
940
|
+
const content = await getSetting(`skill:${name}`, "");
|
|
941
|
+
if (content?.trim()) {
|
|
942
|
+
skillBlock += `\n\n[📜 SKILL: ${name}]\n${content.trim()}`;
|
|
943
|
+
loadedSkills.push(name);
|
|
944
|
+
skillLoaded = true;
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
// Offline fallback: load whatever's in local DB
|
|
948
|
+
if (skillResolution.isOffline) {
|
|
940
949
|
const allSettings = await storage.getAllSettings?.() || {};
|
|
941
950
|
for (const [k, v] of Object.entries(allSettings)) {
|
|
942
951
|
if (!k.startsWith("skill:") || !v)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Skill routing thin client — all routing logic is portal-side.
|
|
3
|
-
* POST SYNALUX_BASE/api/v1/prism/
|
|
3
|
+
* POST SYNALUX_BASE/api/v1/prism/resolve with bearer auth.
|
|
4
4
|
* Cache: keyed on (project,prompt,role), 5-min live / 30s failure.
|
|
5
5
|
* Offline: last-good from local DB, or empty with warning.
|
|
6
6
|
*/
|
|
@@ -45,7 +45,7 @@ async function callPortal(project, prompt, role) {
|
|
|
45
45
|
};
|
|
46
46
|
if (SKILLS_TOKEN)
|
|
47
47
|
headers['Authorization'] = `Bearer ${SKILLS_TOKEN}`;
|
|
48
|
-
const res = await fetch(`${SYNALUX_BASE}/api/v1/prism/
|
|
48
|
+
const res = await fetch(`${SYNALUX_BASE}/api/v1/prism/resolve`, {
|
|
49
49
|
method: 'POST', headers, body: JSON.stringify(body),
|
|
50
50
|
signal: AbortSignal.timeout(5_000),
|
|
51
51
|
});
|
|
@@ -57,11 +57,8 @@ async function callPortal(project, prompt, role) {
|
|
|
57
57
|
return null;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
function makeOffline(
|
|
61
|
-
return {
|
|
62
|
-
names: [], skills: [], user_local: DEFAULT_UL, isOffline: true,
|
|
63
|
-
skillBlock: skillBlock || '',
|
|
64
|
-
};
|
|
60
|
+
function makeOffline() {
|
|
61
|
+
return { names: [], skills: [], user_local: DEFAULT_UL, isOffline: true };
|
|
65
62
|
}
|
|
66
63
|
// -- Public API ---------------------------------------------------------------
|
|
67
64
|
export async function resolveSkills(project, prompt, role) {
|
|
@@ -100,7 +97,6 @@ export async function resolveSkills(project, prompt, role) {
|
|
|
100
97
|
})),
|
|
101
98
|
user_local: DEFAULT_UL,
|
|
102
99
|
isOffline: !cached.live,
|
|
103
|
-
skillBlock: cached.resp.skillBlock,
|
|
104
100
|
routing_version: cached.resp.routing_version,
|
|
105
101
|
};
|
|
106
102
|
}
|
|
@@ -112,7 +108,7 @@ export async function resolveSkills(project, prompt, role) {
|
|
|
112
108
|
const resp = JSON.parse(stored);
|
|
113
109
|
return {
|
|
114
110
|
names: resp.loaded, skills: [], user_local: DEFAULT_UL,
|
|
115
|
-
isOffline: true,
|
|
111
|
+
isOffline: true,
|
|
116
112
|
routing_version: resp.routing_version,
|
|
117
113
|
};
|
|
118
114
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prism-mcp-server",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.1",
|
|
4
4
|
"mcpName": "io.github.dcostenco/prism-coder",
|
|
5
5
|
"description": "Prism Coder — Cognitive memory + tool-calling intelligence for AI agents. Mind Palace persistent memory (BFCL Gold Certified, 100% Tool-Call Accuracy, 114 Agent Skills, PHI Guard, Tier Enforcement, Prompt-Based Skill Routing, Zero-Search HDC/HRR retrieval, HRR Semantic Drift Detection across BCBA/Coding/AAC domains, HIPAA-hardened local-first storage, SLERP-optimized GRPO alignment) plus the prism-coder 1.7B–32B open-weights LLM fleet.",
|
|
6
6
|
"module": "index.ts",
|