@cg3/prior-mcp 0.6.4 → 0.7.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/dist/tools.js CHANGED
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.expandNudgeTokens = expandNudgeTokens;
12
12
  exports.registerTools = registerTools;
13
13
  const zod_1 = require("zod");
14
+ const ops_tools_js_1 = require("./ops-tools.js");
14
15
  const utils_js_1 = require("./utils.js");
15
16
  /**
16
17
  * Coerce a value that might be a string into an array.
@@ -79,7 +80,10 @@ function expandNudgeTokens(message) {
79
80
  return `\`prior_contribute(${attrs})\``;
80
81
  });
81
82
  }
82
- function registerTools(server, { client }) {
83
+ function registerTools(server, { client, enableOpsTools = (0, ops_tools_js_1.isOpsToolsEnabled)() }) {
84
+ if (enableOpsTools) {
85
+ (0, ops_tools_js_1.registerOpsTools)(server, { client });
86
+ }
83
87
  // ── prior_search ────────────────────────────────────────────────────
84
88
  server.registerTool("prior_search", {
85
89
  title: "Search Prior Knowledge Base",
@@ -385,26 +389,31 @@ When: After trying a search result (useful or not_useful), or immediately if a r
385
389
  });
386
390
  // ── prior_status ────────────────────────────────────────────────────
387
391
  server.registerTool("prior_status", {
388
- title: "Check Agent Status",
389
- description: "Check your credits, tier, stats, and contribution count. Also available as a resource at prior://agent/status.",
392
+ title: "Check Prior Status",
393
+ description: "Check your current Prior auth mode, credits, tier, and contribution count. Also available as a resource at prior://agent/status.",
390
394
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
391
395
  outputSchema: {
392
396
  id: zod_1.z.string(),
397
+ authType: zod_1.z.string(),
393
398
  credits: zod_1.z.number().describe("Current credit balance"),
394
399
  tier: zod_1.z.string(),
395
400
  contributions: zod_1.z.number().optional(),
401
+ displayName: zod_1.z.string().optional(),
402
+ email: zod_1.z.string().optional(),
396
403
  },
397
404
  }, async () => {
398
- const data = await client.request("GET", "/v1/agents/me");
399
- const agent = data?.data || data;
405
+ const status = await client.getStatus();
400
406
  return {
401
407
  structuredContent: {
402
- id: agent?.id || "",
403
- credits: agent?.credits ?? 0,
404
- tier: agent?.tier || "free",
405
- contributions: agent?.contributions,
408
+ id: status.id,
409
+ authType: status.authType,
410
+ credits: status.credits,
411
+ tier: status.tier,
412
+ contributions: status.contributions,
413
+ displayName: status.displayName,
414
+ email: status.email,
406
415
  },
407
- content: [{ type: "text", text: (0, utils_js_1.formatResults)(data) }],
416
+ content: [{ type: "text", text: (0, utils_js_1.formatResults)(status) }],
408
417
  };
409
418
  });
410
419
  // ── prior_retract ───────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cg3/prior-mcp",
3
- "version": "0.6.4",
3
+ "version": "0.7.1",
4
4
  "mcpName": "io.cg3/prior",
5
5
  "description": "MCP server for Prior — the knowledge exchange for AI agents. Search, contribute, and improve shared solutions.",
6
6
  "main": "dist/index.js",