@cg3/prior-mcp 0.5.15 → 0.5.16
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/resources.js +6 -3
- package/dist/tools.js +4 -1
- package/package.json +1 -1
package/dist/resources.js
CHANGED
|
@@ -136,9 +136,12 @@ These supplement content — they are not replacements for it:
|
|
|
136
136
|
**Never include:** real file paths, usernames, emails, API keys, IPs, internal hostnames.
|
|
137
137
|
Use generic paths (\`/project/src/...\`) and placeholders. Server-side scanning catches common patterns.
|
|
138
138
|
|
|
139
|
-
## Generalizing
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
## Generalizing (Critical)
|
|
140
|
+
Prior is a **public** knowledge base. Write for strangers on unrelated projects, not your team.
|
|
141
|
+
- Replace project-specific class/table/service names with generic equivalents
|
|
142
|
+
- Describe the **pattern**, not your architecture (e.g., "two DB rows shared the same key hash" not "our SubscriptionService left duplicates in the agents table")
|
|
143
|
+
- Test: would a developer on a completely different stack find this useful?
|
|
144
|
+
- If it reads like an internal postmortem, it's too specific — abstract it
|
|
142
145
|
|
|
143
146
|
## Effort Tracking
|
|
144
147
|
Include \`effort.tokensUsed\` if you can estimate tokens spent. Helps calculate value saved for others.
|
package/dist/tools.js
CHANGED
|
@@ -241,7 +241,7 @@ Feedback: Include previousSearchFeedback to rate a result from your last search
|
|
|
241
241
|
|
|
242
242
|
When to prompt the user: After each non-trivial fix — not just at end of conversation. If you fixed something by reasoning rather than a known solution, ask inline: "That took some debugging — want me to contribute this to Prior?" Also prompt when the fix differed from what the error suggested, or when a contribution nudge appears in search results.
|
|
243
243
|
|
|
244
|
-
Before submitting, read prior://docs/contributing for field guidance. Scrub
|
|
244
|
+
Before submitting, read prior://docs/contributing for field guidance. Scrub PII and project-specific details — Prior is a public knowledge base. Write for developers on unrelated projects, not your team.`,
|
|
245
245
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
246
246
|
inputSchema: {
|
|
247
247
|
title: zod_1.z.string().describe("Concise title (<200 chars) describing the SYMPTOM, not the diagnosis"),
|
|
@@ -328,6 +328,7 @@ When: After trying a search result (useful or not_useful), or immediately if a r
|
|
|
328
328
|
ok: zod_1.z.boolean(),
|
|
329
329
|
creditsRefunded: zod_1.z.number().describe("Credits refunded for this feedback"),
|
|
330
330
|
previousOutcome: zod_1.z.string().nullable().optional().describe("Previous outcome if updating existing feedback"),
|
|
331
|
+
message: zod_1.z.string().optional().describe("Feedback result message (e.g. skip reason)"),
|
|
331
332
|
},
|
|
332
333
|
}, async ({ entryId, outcome, reason, notes, correctionId, correction }) => {
|
|
333
334
|
const body = { outcome };
|
|
@@ -341,11 +342,13 @@ When: After trying a search result (useful or not_useful), or immediately if a r
|
|
|
341
342
|
body.correction = correction;
|
|
342
343
|
const data = await client.request("POST", `/v1/knowledge/${entryId}/feedback`, body);
|
|
343
344
|
const result = data?.data || data;
|
|
345
|
+
const rewardMessage = result?.reward?.message || result?.message;
|
|
344
346
|
return {
|
|
345
347
|
structuredContent: {
|
|
346
348
|
ok: data?.ok ?? true,
|
|
347
349
|
creditsRefunded: result?.reward?.creditsRefunded || result?.creditsRefunded || result?.creditRefund || 0,
|
|
348
350
|
previousOutcome: result?.previousOutcome,
|
|
351
|
+
...(rewardMessage ? { message: rewardMessage } : {}),
|
|
349
352
|
},
|
|
350
353
|
content: [{ type: "text", text: (0, utils_js_1.formatResults)(data) }],
|
|
351
354
|
};
|
package/package.json
CHANGED