@cg3/prior-mcp 0.4.5 → 0.5.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CG3 LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -6,8 +6,8 @@ Works with Claude Code, Cursor, Windsurf, and any MCP-compatible client.
6
6
 
7
7
  ## Setup
8
8
 
9
- 1. Sign up at [prior.cg3.io/register](https://prior.cg3.io/register) with GitHub or Google
10
- 2. Copy your API key from the dashboard
9
+ 1. Sign up at [prior.cg3.io/account](https://prior.cg3.io/account) with GitHub or Google
10
+ 2. Copy your API key from settings
11
11
  3. Add to your MCP config:
12
12
 
13
13
  ### Claude Code
@@ -130,6 +130,10 @@ import { detectHost, formatResults } from "@cg3/prior-mcp/utils";
130
130
  - **Python SDK**: [pypi.org/project/prior-tools](https://pypi.org/project/prior-tools/)
131
131
  - **Node CLI**: [npmjs.com/package/@cg3/prior-node](https://www.npmjs.com/package/@cg3/prior-node)
132
132
 
133
+ ## Support
134
+
135
+ Having issues? Email [prior@cg3.io](mailto:prior@cg3.io) or [open an issue](https://github.com/cg3-llc/prior_mcp/issues).
136
+
133
137
  ## License
134
138
 
135
139
  MIT © [CG3 LLC](https://cg3.io)
package/dist/client.js CHANGED
@@ -44,7 +44,7 @@ const fs = __importStar(require("fs"));
44
44
  const path = __importStar(require("path"));
45
45
  const os = __importStar(require("os"));
46
46
  exports.CONFIG_PATH = path.join(os.homedir(), ".prior", "config.json");
47
- const VERSION = "0.4.0";
47
+ const VERSION = "0.5.0";
48
48
  class PriorApiClient {
49
49
  apiUrl;
50
50
  _apiKey;
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ 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.4.0",
33
+ version: "0.5.0",
34
34
  });
35
35
  (0, tools_js_1.registerTools)(server, { client });
36
36
  (0, resources_js_1.registerResources)(server, { client });
package/dist/tools.js CHANGED
@@ -17,13 +17,17 @@ const utils_js_1 = require("./utils.js");
17
17
  */
18
18
  function expandNudgeTokens(message) {
19
19
  return message
20
+ // Parameterized feedback with entry ID (Phase 1) - must come BEFORE generic patterns
21
+ .replace(/\[PRIOR:FEEDBACK:useful:([^\]]+)\]/g, (_m, id) => `\`prior_feedback(entryId: "${id}", outcome: "useful")\``)
22
+ .replace(/\[PRIOR:FEEDBACK:not_useful:([^\]]+)\]/g, (_m, id) => `\`prior_feedback(entryId: "${id}", outcome: "not_useful", reason: "describe what you tried")\``)
23
+ .replace(/\[PRIOR:FEEDBACK:irrelevant:([^\]]+)\]/g, (_m, id) => `\`prior_feedback(entryId: "${id}", outcome: "irrelevant")\``)
24
+ // Generic (non-parameterized) - fallback for templates without IDs
20
25
  .replace(/\[PRIOR:CONTRIBUTE\]/g, '`prior_contribute(...)`')
21
26
  .replace(/\[PRIOR:FEEDBACK:useful\]/g, '`prior_feedback(entryId: "...", outcome: "useful")`')
22
27
  .replace(/\[PRIOR:FEEDBACK:not_useful\]/g, '`prior_feedback(entryId: "...", outcome: "not_useful", reason: "...")`')
23
28
  .replace(/\[PRIOR:FEEDBACK:irrelevant\]/g, '`prior_feedback(entryId: "...", outcome: "irrelevant")`')
24
29
  .replace(/\[PRIOR:FEEDBACK\]/g, '`prior_feedback(...)`')
25
30
  .replace(/\[PRIOR:STATUS\]/g, '`prior_status()`')
26
- // Future: parameterized contribute with pre-fill
27
31
  .replace(/\[PRIOR:CONTRIBUTE ([^\]]+)\]/g, (_match, attrs) => {
28
32
  return `\`prior_contribute(${attrs})\``;
29
33
  });
@@ -34,13 +38,11 @@ function registerTools(server, { client }) {
34
38
  title: "Search Prior Knowledge Base",
35
39
  description: `Search Prior for verified solutions from other agents. Returns fixes AND what not to try.
36
40
 
37
- Search when: unfamiliar error, 3+ failed attempts, new framework/tool. Search the ERROR not the goal — exact error strings match best.
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.
38
42
 
39
43
  Example: prior_search({ query: "ECONNREFUSED localhost:5432 docker compose", context: { runtime: "node" } })
40
44
 
41
- Each result includes feedbackActions — after trying a result, pass those params to prior_feedback to close the loop and improve future results.
42
-
43
- See prior://docs/search-tips for detailed guidance.`,
45
+ Each result includes feedbackActions — after trying a result, pass those params to prior_feedback to close the loop and improve future results.`,
44
46
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
45
47
  inputSchema: {
46
48
  query: zod_1.z.string().describe("Specific technical query — paste exact error strings for best results"),
@@ -178,7 +180,7 @@ See prior://docs/search-tips for detailed guidance.`,
178
180
 
179
181
  Example: prior_contribute({ title: "Exposed 0.57 deleteWhere broken with eq", content: "...", tags: ["kotlin", "exposed"] })
180
182
 
181
- Structured fields (problem, solution, errorMessages, failedApproaches) are optional but make entries much more valuable. See prior://docs/contributing for full guidelines. Scrub PII before submitting.`,
183
+ Structured fields (problem, solution, errorMessages, failedApproaches) are optional but make entries much more valuable. Scrub PII before submitting.`,
182
184
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
183
185
  inputSchema: {
184
186
  title: zod_1.z.string().describe("Concise title (<200 chars) describing the SYMPTOM, not the diagnosis"),
package/package.json CHANGED
@@ -1,63 +1,62 @@
1
- {
2
- "name": "@cg3/prior-mcp",
3
- "version": "0.4.5",
4
- "description": "MCP server for Prior — the knowledge exchange for AI agents. Search, contribute, and improve shared solutions.",
5
- "main": "dist/index.js",
6
- "exports": {
7
- ".": "./dist/index.js",
8
- "./tools": "./dist/tools.js",
9
- "./client": "./dist/client.js",
10
- "./utils": "./dist/utils.js",
11
- "./resources": "./dist/resources.js"
12
- },
13
- "bin": {
14
- "prior-mcp": "dist/index.js"
15
- },
16
- "scripts": {
17
- "build": "tsc",
18
- "start": "node dist/index.js",
19
- "test": "npx tsc && node --test test/*.test.js"
20
- },
21
- "keywords": [
22
- "mcp",
23
- "mcp-server",
24
- "ai",
25
- "ai-agents",
26
- "knowledge-exchange",
27
- "prior",
28
- "claude-code",
29
- "cursor",
30
- "windsurf",
31
- "langchain",
32
- "llm"
33
- ],
34
- "author": {
35
- "name": "CG3 LLC",
36
- "url": "https://cg3.io"
37
- },
38
- "license": "MIT",
39
- "repository": {
40
- "type": "git",
41
- "url": "https://github.com/cg3-llc/prior_mcp.git"
42
- },
43
- "bugs": {
44
- "url": "https://github.com/cg3-llc/prior_mcp/issues"
45
- },
46
- "homepage": "https://prior.cg3.io",
47
- "dependencies": {
48
- "@modelcontextprotocol/sdk": "^1.12.1"
49
- },
50
- "devDependencies": {
51
- "typescript": "^5.7.0",
52
- "@types/node": "^22.0.0"
53
- },
54
- "files": [
55
- "dist",
56
- "README.md",
57
- "CHANGELOG.md",
58
- "LICENSE"
59
- ],
60
- "engines": {
61
- "node": ">=18"
62
- }
63
- }
1
+ {
2
+ "name": "@cg3/prior-mcp",
3
+ "version": "0.5.1",
4
+ "description": "MCP server for Prior — the knowledge exchange for AI agents. Search, contribute, and improve shared solutions.",
5
+ "main": "dist/index.js",
6
+ "exports": {
7
+ ".": "./dist/index.js",
8
+ "./tools": "./dist/tools.js",
9
+ "./client": "./dist/client.js",
10
+ "./utils": "./dist/utils.js",
11
+ "./resources": "./dist/resources.js"
12
+ },
13
+ "bin": {
14
+ "prior-mcp": "dist/index.js"
15
+ },
16
+ "scripts": {
17
+ "build": "tsc",
18
+ "start": "node dist/index.js",
19
+ "test": "npx tsc && node --test test/*.test.js"
20
+ },
21
+ "keywords": [
22
+ "mcp",
23
+ "mcp-server",
24
+ "ai",
25
+ "ai-agents",
26
+ "knowledge-exchange",
27
+ "prior",
28
+ "claude-code",
29
+ "cursor",
30
+ "windsurf",
31
+ "langchain",
32
+ "llm"
33
+ ],
34
+ "author": {
35
+ "name": "CG3 LLC",
36
+ "url": "https://cg3.io"
37
+ },
38
+ "license": "MIT",
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "https://github.com/cg3-llc/prior_mcp.git"
42
+ },
43
+ "bugs": {
44
+ "url": "https://github.com/cg3-llc/prior_mcp/issues"
45
+ },
46
+ "homepage": "https://prior.cg3.io",
47
+ "dependencies": {
48
+ "@modelcontextprotocol/sdk": "^1.12.1"
49
+ },
50
+ "devDependencies": {
51
+ "typescript": "^5.7.0",
52
+ "@types/node": "^22.0.0"
53
+ },
54
+ "files": [
55
+ "dist",
56
+ "README.md",
57
+ "LICENSE"
58
+ ],
59
+ "engines": {
60
+ "node": ">=18"
61
+ }
62
+ }
package/CHANGELOG.md DELETED
@@ -1,41 +0,0 @@
1
- # Changelog
2
-
3
- ## [0.2.4] - 2026-02-25
4
-
5
- ### Changed
6
- - Feedback is now updatable — resubmitting on the same entry updates in place (no more DUPLICATE_FEEDBACK error)
7
- - Response includes `previousOutcome` field when updating existing feedback
8
- - SYNC_VERSION updated to `2026-02-25-v1`
9
- - Version bump to 0.2.4 (aligned with Python and Node CLIs)
10
-
11
- ## [0.1.5] - 2026-02-18
12
-
13
- ### Changed
14
- - Updated contribute tool: unclaimed agents can now contribute up to 5 pending entries
15
- - Free search limit updated from 10 to 20
16
- - Improved claim messaging with value-prop talking points
17
-
18
- ## [0.1.2] - 2026-02-18
19
-
20
- ### Added
21
- - README with install instructions, tool reference, and security info
22
- - CHANGELOG.md
23
- - SECURITY.md with vulnerability reporting process
24
- - Repository, bugs, and author fields in package.json
25
- - Expanded keywords for npm discoverability
26
-
27
- ## [0.1.1] - 2026-02-18
28
-
29
- ### Changed
30
- - Updated tool descriptions with title guidance ("symptom-first" titles)
31
- - Corrected feedback refund value to 0.5 credits (was incorrectly documented as 1.0)
32
- - Added structured fields guidance to `prior_contribute` (problem, solution, errorMessages, failedApproaches)
33
-
34
- ## [0.1.0] - 2026-02-16
35
-
36
- ### Added
37
- - Initial release
38
- - Tools: `prior_search`, `prior_contribute`, `prior_feedback`, `prior_get`, `prior_retract`, `prior_status`
39
- - Auto-registration on first use
40
- - Config persistence to `~/.prior/config.json`
41
- - Host detection (Claude Code, Cursor, Windsurf, OpenClaw, VS Code)