mcplane 0.3.0 → 0.3.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/checks/tools.js +5 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/checks/tools.js
CHANGED
|
@@ -12,17 +12,17 @@ const INSTRUCTION = [
|
|
|
12
12
|
/\b(call|use) (this|it) only\b/i,
|
|
13
13
|
];
|
|
14
14
|
/** Plan and pricing copy. OpenAI prohibits in-app upsells, "including freemium upsells". */
|
|
15
|
-
|
|
15
|
+
// Plan and tier language only: product prices ("live pricing", "premium cars") are not upsells.
|
|
16
|
+
const UPSELL = /\b(upgrade (to|your|now)|pro plan|premium (plan|tier|account|subscription|version)|paid (plan|tier|account)|free trial|subscribe (to|now)|unlock (more|premium|pro|unlimited|all))\b/i;
|
|
16
17
|
/** Inputs that suggest a write authorised only by a secret passed through the chat. */
|
|
17
18
|
const BEARER_INPUT = /^(token|edit_token|update_token|secret|access_key|api_key|password)$/i;
|
|
18
19
|
export function toolChecks(tools) {
|
|
19
20
|
if (!tools.length)
|
|
20
21
|
return [];
|
|
21
22
|
const checks = [];
|
|
22
|
-
const names = new Set(tools.map((t) => t.name));
|
|
23
23
|
const noTitle = tools.filter((t) => !t.title && !t.annotations?.title);
|
|
24
24
|
checks.push(noTitle.length
|
|
25
|
-
? { id: 'tools.title', level: '
|
|
25
|
+
? { id: 'tools.title', level: 'warn', title: 'Every tool has a human-readable title', detail: noTitle.map((t) => t.name).join(', '), fix: 'Add "title" (or annotations.title) to each tool. Clients show the raw name without one, and Anthropic’s reviewers ask for them on new submissions.', stores: ['claude-connectors', 'claude-plugins'] }
|
|
26
26
|
: { id: 'tools.title', level: 'pass', title: 'Every tool has a human-readable title' });
|
|
27
27
|
const missing = tools.flatMap((t) => HINTS.filter((h) => typeof t.annotations?.[h] !== 'boolean').map((h) => `${t.name}.${h}`));
|
|
28
28
|
checks.push(missing.length
|
|
@@ -46,8 +46,8 @@ export function toolChecks(tools) {
|
|
|
46
46
|
const instructing = tools.flatMap((t) => {
|
|
47
47
|
const text = `${t.description ?? ''}`;
|
|
48
48
|
const hits = INSTRUCTION.filter((re) => re.test(text)).map((re) => text.match(re)[0]);
|
|
49
|
-
|
|
50
|
-
return hits.length
|
|
49
|
+
// Naming a sibling tool ("call get_session first") is common in approved listings, so only explicit instructions count.
|
|
50
|
+
return hits.length ? [`${t.name}: ${hits.map((h) => `"${h}"`).join(', ')}`] : [];
|
|
51
51
|
});
|
|
52
52
|
checks.push(instructing.length
|
|
53
53
|
? {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.3.
|
|
1
|
+
export declare const VERSION = "0.3.1";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.3.
|
|
1
|
+
export const VERSION = '0.3.1';
|
package/package.json
CHANGED