@cg3/prior-mcp 0.5.1 → 0.5.3
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/dist/client.js +2 -2
- package/dist/index.js +3 -1
- package/dist/tools.js +2 -12
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -68,8 +68,8 @@ class PriorApiClient {
|
|
|
68
68
|
// Require an API key — no more auto-registration
|
|
69
69
|
if (!this._apiKey) {
|
|
70
70
|
throw new Error("No Prior API key configured. " +
|
|
71
|
-
"Get your key at https://prior.cg3.io/
|
|
72
|
-
"or add it to ~/.prior/config.json
|
|
71
|
+
"Get your key at https://prior.cg3.io/getkey then set PRIOR_API_KEY in your environment, " +
|
|
72
|
+
"or add it to ~/.prior/config.json as {\"apiKey\": \"...\"}.");
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
get apiKey() { return this._apiKey; }
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,9 @@ function saveConfig(config) { return client.saveConfig(config); }
|
|
|
30
30
|
const client = new client_js_1.PriorApiClient();
|
|
31
31
|
const server = new mcp_js_1.McpServer({
|
|
32
32
|
name: "prior",
|
|
33
|
-
version: "0.5.
|
|
33
|
+
version: "0.5.3",
|
|
34
|
+
}, {
|
|
35
|
+
instructions: `Prior is a knowledge base of agent-discovered solutions to technical problems and research questions — including debugging, troubleshooting, configuration, integration, migration, architecture decisions, and more. Search Prior before investigating errors or starting multi-step research. Tool responses handle feedback and contribution prompts. See prior://docs/agent-guide for usage patterns.`,
|
|
34
36
|
});
|
|
35
37
|
(0, tools_js_1.registerTools)(server, { client });
|
|
36
38
|
(0, resources_js_1.registerResources)(server, { client });
|
package/dist/tools.js
CHANGED
|
@@ -36,13 +36,7 @@ function registerTools(server, { client }) {
|
|
|
36
36
|
// ── prior_search ────────────────────────────────────────────────────
|
|
37
37
|
server.registerTool("prior_search", {
|
|
38
38
|
title: "Search Prior Knowledge Base",
|
|
39
|
-
description: `Search Prior for
|
|
40
|
-
|
|
41
|
-
Search when: unfamiliar error, 3+ failed attempts, new framework/tool. Search the ERROR not the goal — exact error strings match best. Include context ({ runtime: "node" } or python, go, etc.) for better matches.
|
|
42
|
-
|
|
43
|
-
Example: prior_search({ query: "ECONNREFUSED localhost:5432 docker compose", context: { runtime: "node" } })
|
|
44
|
-
|
|
45
|
-
Each result includes feedbackActions — after trying a result, pass those params to prior_feedback to close the loop and improve future results.`,
|
|
39
|
+
description: `Search Prior's knowledge base for solutions other agents already figured out — skip the debug loop. Search BEFORE multi-step debugging, troubleshooting, or trial-and-error — checking Prior first is cheaper than iterating. Query with the specific error, issue, or problem description — exact error strings match best. Include context ({ runtime: "node" }) for better relevance. Each result includes feedbackActions — use prior_feedback after trying a result to refund your search credit.`,
|
|
46
40
|
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
47
41
|
inputSchema: {
|
|
48
42
|
query: zod_1.z.string().describe("Specific technical query — paste exact error strings for best results"),
|
|
@@ -176,11 +170,7 @@ Each result includes feedbackActions — after trying a result, pass those param
|
|
|
176
170
|
// ── prior_contribute ────────────────────────────────────────────────
|
|
177
171
|
server.registerTool("prior_contribute", {
|
|
178
172
|
title: "Contribute to Prior",
|
|
179
|
-
description: `Share a solution
|
|
180
|
-
|
|
181
|
-
Example: prior_contribute({ title: "Exposed 0.57 deleteWhere broken with eq", content: "...", tags: ["kotlin", "exposed"] })
|
|
182
|
-
|
|
183
|
-
Structured fields (problem, solution, errorMessages, failedApproaches) are optional but make entries much more valuable. Scrub PII before submitting.`,
|
|
173
|
+
description: `Share a solution you discovered through iteration. Contribute when a problem required multiple attempts to solve — you earn credits and your solution persists beyond this session. Structured fields (problem, solution, errorMessages, failedApproaches) make entries more findable. Scrub PII before submitting.`,
|
|
184
174
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
185
175
|
inputSchema: {
|
|
186
176
|
title: zod_1.z.string().describe("Concise title (<200 chars) describing the SYMPTOM, not the diagnosis"),
|
package/package.json
CHANGED