@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/README.md +54 -25
- package/dist/client.d.ts +53 -6
- package/dist/client.js +515 -25
- package/dist/index.d.ts +5 -6
- package/dist/index.js +39 -14
- package/dist/ops-tools.d.ts +14 -0
- package/dist/ops-tools.js +169 -0
- package/dist/resources.d.ts +1 -1
- package/dist/resources.js +130 -122
- package/dist/tools.d.ts +2 -1
- package/dist/tools.js +19 -10
- package/package.json +1 -1
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
|
|
389
|
-
description: "Check your credits, tier,
|
|
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
|
|
399
|
-
const agent = data?.data || data;
|
|
405
|
+
const status = await client.getStatus();
|
|
400
406
|
return {
|
|
401
407
|
structuredContent: {
|
|
402
|
-
id:
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
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)(
|
|
416
|
+
content: [{ type: "text", text: (0, utils_js_1.formatResults)(status) }],
|
|
408
417
|
};
|
|
409
418
|
});
|
|
410
419
|
// ── prior_retract ───────────────────────────────────────────────────
|
package/package.json
CHANGED