@squadrules/mcp 5.20.0 → 5.22.0
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/.tsbuildinfo +1 -1
- package/dist/embed-docs/mem/adapter-migration.md +1 -1
- package/dist/embed-docs/mem/author-adapter.md +1 -1
- package/dist/embed-docs/mem/bulk-insert-adapters-via-cli.md +1 -1
- package/dist/embed-docs/mem/challenge-type-guide.md +1 -1
- package/dist/embed-docs/mem/critic-loop-guide.md +1 -1
- package/dist/embed-docs/mem/critic-loop.md +1 -1
- package/dist/embed-docs/mem/protocol-linking-guide.md +1 -1
- package/dist/embed-docs/mem/refine-search.md +1 -1
- package/dist/resources/docs-resources.d.ts.map +1 -1
- package/dist/resources/docs-resources.js +34 -5
- package/dist/resources/docs-resources.js.map +1 -1
- package/dist/resources/embedded-mcp-resources.js +8 -8
- package/dist/resources/prompt-icons.d.ts +27 -0
- package/dist/resources/prompt-icons.d.ts.map +1 -0
- package/dist/resources/prompt-icons.js +33 -0
- package/dist/resources/prompt-icons.js.map +1 -0
- package/dist/resources/prompt-metadata.d.ts +29 -0
- package/dist/resources/prompt-metadata.d.ts.map +1 -0
- package/dist/resources/prompt-metadata.js +34 -0
- package/dist/resources/prompt-metadata.js.map +1 -0
- package/dist/resources/prompt-resources.d.ts.map +1 -1
- package/dist/resources/prompt-resources.js +26 -6
- package/dist/resources/prompt-resources.js.map +1 -1
- package/dist/resources/resource-annotations.d.ts +29 -0
- package/dist/resources/resource-annotations.d.ts.map +1 -0
- package/dist/resources/resource-annotations.js +61 -0
- package/dist/resources/resource-annotations.js.map +1 -0
- package/dist/resources/resource-descriptions.d.ts +24 -0
- package/dist/resources/resource-descriptions.d.ts.map +1 -0
- package/dist/resources/resource-descriptions.js +112 -0
- package/dist/resources/resource-descriptions.js.map +1 -0
- package/dist/resources/resource-icons.d.ts +31 -0
- package/dist/resources/resource-icons.d.ts.map +1 -0
- package/dist/resources/resource-icons.js +71 -0
- package/dist/resources/resource-icons.js.map +1 -0
- package/dist/runtime-lock.json +2 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +136 -4
- package/dist/server.js.map +1 -1
- package/dist/tools/activate.d.ts.map +1 -1
- package/dist/tools/activate.js +5 -1
- package/dist/tools/activate.js.map +1 -1
- package/dist/tools/forward-register.d.ts.map +1 -1
- package/dist/tools/forward-register.js +5 -1
- package/dist/tools/forward-register.js.map +1 -1
- package/dist/ui/assets/{AccountPage-DH1vwc2O.js → AccountPage-BL-DpBiv.js} +1 -1
- package/dist/ui/assets/{index-2iUzrQ_h.js → index-BenjvYIQ.js} +2 -2
- package/dist/ui/index.html +1 -1
- package/dist/utils/pagination.d.ts +57 -0
- package/dist/utils/pagination.d.ts.map +1 -0
- package/dist/utils/pagination.js +88 -0
- package/dist/utils/pagination.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt icons for SquadRules MCP prompts.
|
|
3
|
+
*
|
|
4
|
+
* Each prompt has a meaningful icon encoded as a data URI (image/svg+xml).
|
|
5
|
+
* The MCP 2026-07-28 spec requires at minimum image/png at 48x48, but
|
|
6
|
+
* SVG is more flexible and scales better. We provide SVG icons.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PROMPT_ICON: string;
|
|
9
|
+
/**
|
|
10
|
+
* Icon metadata for prompts - follows MCP 2026-07-28 spec.
|
|
11
|
+
* Each entry provides an SVG icon at 48x48.
|
|
12
|
+
*/
|
|
13
|
+
export declare const PROMPT_ICONS: Record<string, Array<{
|
|
14
|
+
src: string;
|
|
15
|
+
mimeType: string;
|
|
16
|
+
sizes: string[];
|
|
17
|
+
}>>;
|
|
18
|
+
/**
|
|
19
|
+
* Get icons for a prompt by name.
|
|
20
|
+
* Falls back to default prompt icon if no specific icon exists.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getPromptIcons(promptName: string): Array<{
|
|
23
|
+
src: string;
|
|
24
|
+
mimeType: string;
|
|
25
|
+
sizes: string[];
|
|
26
|
+
}>;
|
|
27
|
+
//# sourceMappingURL=prompt-icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-icons.d.ts","sourceRoot":"","sources":["../../src/resources/prompt-icons.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,eAAO,MAAM,WAAW,QAItB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAGzF,CAAC;AAEX;;;GAGG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAE5G"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt icons for SquadRules MCP prompts.
|
|
3
|
+
*
|
|
4
|
+
* Each prompt has a meaningful icon encoded as a data URI (image/svg+xml).
|
|
5
|
+
* The MCP 2026-07-28 spec requires at minimum image/png at 48x48, but
|
|
6
|
+
* SVG is more flexible and scales better. We provide SVG icons.
|
|
7
|
+
*/
|
|
8
|
+
const createSvgDataUri = (svgContent) => {
|
|
9
|
+
const encoded = encodeURIComponent(svgContent.trim());
|
|
10
|
+
return `data:image/svg+xml,${encoded}`;
|
|
11
|
+
};
|
|
12
|
+
// Generic prompt icon: chat/message icon
|
|
13
|
+
export const PROMPT_ICON = createSvgDataUri(`
|
|
14
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#3F51B5" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
15
|
+
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>
|
|
16
|
+
</svg>
|
|
17
|
+
`);
|
|
18
|
+
/**
|
|
19
|
+
* Icon metadata for prompts - follows MCP 2026-07-28 spec.
|
|
20
|
+
* Each entry provides an SVG icon at 48x48.
|
|
21
|
+
*/
|
|
22
|
+
export const PROMPT_ICONS = {
|
|
23
|
+
// Default icon for all prompts (can be extended per-prompt as needed)
|
|
24
|
+
_default: [{ src: PROMPT_ICON, mimeType: 'image/svg+xml', sizes: ['48x48'] }]
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Get icons for a prompt by name.
|
|
28
|
+
* Falls back to default prompt icon if no specific icon exists.
|
|
29
|
+
*/
|
|
30
|
+
export function getPromptIcons(promptName) {
|
|
31
|
+
return PROMPT_ICONS[promptName] || PROMPT_ICONS['_default'];
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=prompt-icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-icons.js","sourceRoot":"","sources":["../../src/resources/prompt-icons.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,gBAAgB,GAAG,CAAC,UAAkB,EAAU,EAAE;IACtD,MAAM,OAAO,GAAG,kBAAkB,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;IACtD,OAAO,sBAAsB,OAAO,EAAE,CAAC;AACzC,CAAC,CAAC;AAEF,yCAAyC;AACzC,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAC;;;;CAI3C,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAA8E;IACrG,sEAAsE;IACtE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CACrE,CAAC;AAEX;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,OAAO,YAAY,CAAC,UAAU,CAAC,IAAI,YAAY,CAAC,UAAU,CAAE,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt metadata for SquadRules MCP prompts.
|
|
3
|
+
*
|
|
4
|
+
* Provides real descriptions (not template-derived) and argument declarations
|
|
5
|
+
* for prompts. This helps hosts render parameterized commands and gives agents
|
|
6
|
+
* better context about what each prompt does.
|
|
7
|
+
*/
|
|
8
|
+
export interface PromptArgument {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface PromptMetadata {
|
|
14
|
+
description: string;
|
|
15
|
+
arguments?: PromptArgument[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Metadata for each prompt.
|
|
19
|
+
*
|
|
20
|
+
* Descriptions are sourced from the prompt's purpose and first paragraph.
|
|
21
|
+
* Arguments are declared for prompts that accept parameters.
|
|
22
|
+
*/
|
|
23
|
+
export declare const PROMPT_METADATA: Record<string, PromptMetadata>;
|
|
24
|
+
/**
|
|
25
|
+
* Get metadata for a prompt by name.
|
|
26
|
+
* Returns default metadata if no specific override exists.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getPromptMetadata(promptName: string, fallbackDescription: string): PromptMetadata;
|
|
29
|
+
//# sourceMappingURL=prompt-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-metadata.d.ts","sourceRoot":"","sources":["../../src/resources/prompt-metadata.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CASjD,CAAC;AAEX;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,GAAG,cAAc,CAKjG"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt metadata for SquadRules MCP prompts.
|
|
3
|
+
*
|
|
4
|
+
* Provides real descriptions (not template-derived) and argument declarations
|
|
5
|
+
* for prompts. This helps hosts render parameterized commands and gives agents
|
|
6
|
+
* better context about what each prompt does.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Metadata for each prompt.
|
|
10
|
+
*
|
|
11
|
+
* Descriptions are sourced from the prompt's purpose and first paragraph.
|
|
12
|
+
* Arguments are declared for prompts that accept parameters.
|
|
13
|
+
*/
|
|
14
|
+
export const PROMPT_METADATA = {
|
|
15
|
+
// Example entries - extend as prompts are added
|
|
16
|
+
// 'example-prompt': {
|
|
17
|
+
// description: 'Generates a structured response for common queries.',
|
|
18
|
+
// arguments: [
|
|
19
|
+
// { name: 'query', description: 'The user query to respond to', required: true },
|
|
20
|
+
// { name: 'format', description: 'Output format (text|markdown|json)', required: false }
|
|
21
|
+
// ]
|
|
22
|
+
// }
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Get metadata for a prompt by name.
|
|
26
|
+
* Returns default metadata if no specific override exists.
|
|
27
|
+
*/
|
|
28
|
+
export function getPromptMetadata(promptName, fallbackDescription) {
|
|
29
|
+
return PROMPT_METADATA[promptName] || {
|
|
30
|
+
description: fallbackDescription,
|
|
31
|
+
arguments: []
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=prompt-metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-metadata.js","sourceRoot":"","sources":["../../src/resources/prompt-metadata.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAmC;AAC7D,gDAAgD;AAChD,sBAAsB;AACtB,wEAAwE;AACxE,iBAAiB;AACjB,sFAAsF;AACtF,6FAA6F;AAC7F,MAAM;AACN,IAAI;CACI,CAAC;AAEX;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAkB,EAAE,mBAA2B;IAC/E,OAAO,eAAe,CAAC,UAAU,CAAC,IAAI;QACpC,WAAW,EAAE,mBAAmB;QAChC,SAAS,EAAE,EAAE;KACd,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-resources.d.ts","sourceRoot":"","sources":["../../src/resources/prompt-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,MAAM,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"prompt-resources.d.ts","sourceRoot":"","sources":["../../src/resources/prompt-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,MAAM,EAAE,MAAM,8BAA8B,CAAC;AA4C5E,4FAA4F;AAC5F,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAY9C;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,GAAG,QAwDlD"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { getPrompts, getPrompt } from './embedded-mcp-resources.js';
|
|
2
2
|
import { logger } from '../utils/structured-logger.js';
|
|
3
|
+
import { getPromptIcons } from './prompt-icons.js';
|
|
4
|
+
import { getPromptMetadata } from './prompt-metadata.js';
|
|
5
|
+
import { buildEmbeddedDocsCacheMetadata, buildServerInfoMeta } from '../utils/pagination.js';
|
|
3
6
|
const promptOverrides = {};
|
|
4
7
|
function formatPromptTitle(key) {
|
|
5
8
|
return key.replace(/[-_]/g, ' ').replace(/\b\w/g, (letter) => letter.toUpperCase());
|
|
@@ -7,21 +10,32 @@ function formatPromptTitle(key) {
|
|
|
7
10
|
function buildRegisteredPrompt(key, text) {
|
|
8
11
|
const override = promptOverrides[key] ?? {};
|
|
9
12
|
const title = override.title ?? formatPromptTitle(key);
|
|
10
|
-
const
|
|
13
|
+
const fallbackDescription = `Prompt: ${title}`;
|
|
14
|
+
const metadata = getPromptMetadata(key, fallbackDescription);
|
|
15
|
+
const description = override.description ?? metadata.description;
|
|
16
|
+
const icons = getPromptIcons(key);
|
|
11
17
|
return {
|
|
12
18
|
name: key,
|
|
13
19
|
title,
|
|
14
20
|
description,
|
|
15
21
|
resultDescription: override.resultDescription ?? description,
|
|
16
|
-
text
|
|
22
|
+
text,
|
|
23
|
+
icons,
|
|
24
|
+
...(metadata.arguments && metadata.arguments.length > 0 ? { arguments: metadata.arguments } : {})
|
|
17
25
|
};
|
|
18
26
|
}
|
|
19
27
|
/** Prompt entries for `prompts/list`-shaped surfaces (for example `listOfferingsForUI`). */
|
|
20
28
|
export function listPromptOfferings() {
|
|
21
29
|
const prompts = getPrompts();
|
|
22
30
|
return Object.entries(prompts).map(([key, text]) => {
|
|
23
|
-
const { name, title, description } = buildRegisteredPrompt(key, text);
|
|
24
|
-
return {
|
|
31
|
+
const { name, title, description, icons, arguments: args } = buildRegisteredPrompt(key, text);
|
|
32
|
+
return {
|
|
33
|
+
name,
|
|
34
|
+
title,
|
|
35
|
+
description,
|
|
36
|
+
...(icons ? { icons } : {}),
|
|
37
|
+
...(args && args.length > 0 ? { arguments: args } : {})
|
|
38
|
+
};
|
|
25
39
|
});
|
|
26
40
|
}
|
|
27
41
|
/**
|
|
@@ -37,10 +51,13 @@ export function registerPromptResources(server) {
|
|
|
37
51
|
const prompt = buildRegisteredPrompt(key, text);
|
|
38
52
|
server.registerPrompt(prompt.name, {
|
|
39
53
|
title: prompt.title,
|
|
40
|
-
description: prompt.description
|
|
54
|
+
description: prompt.description,
|
|
55
|
+
...(prompt.icons ? { icons: prompt.icons } : {})
|
|
41
56
|
}, async () => {
|
|
42
57
|
const promptText = getPrompt(prompt.name) ?? prompt.text;
|
|
58
|
+
const cacheMetadata = buildEmbeddedDocsCacheMetadata();
|
|
43
59
|
const result = {
|
|
60
|
+
resultType: 'complete',
|
|
44
61
|
description: prompt.resultDescription,
|
|
45
62
|
messages: [
|
|
46
63
|
{
|
|
@@ -50,7 +67,10 @@ export function registerPromptResources(server) {
|
|
|
50
67
|
text: promptText
|
|
51
68
|
}
|
|
52
69
|
}
|
|
53
|
-
]
|
|
70
|
+
],
|
|
71
|
+
ttlMs: cacheMetadata.ttlMs,
|
|
72
|
+
cacheScope: cacheMetadata.cacheScope,
|
|
73
|
+
_meta: buildServerInfoMeta()
|
|
54
74
|
};
|
|
55
75
|
return result;
|
|
56
76
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-resources.js","sourceRoot":"","sources":["../../src/resources/prompt-resources.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"prompt-resources.js","sourceRoot":"","sources":["../../src/resources/prompt-resources.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAQ7F,MAAM,eAAe,GAAmC,EAAE,CAAC;AAQ3D,SAAS,iBAAiB,CAAC,GAAW;IACpC,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,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AAI,EAAE,MAAM;wBACZ,OAAO,EAAE;4BACP,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,UAAU;yBACjB;qBACF;iBACF;gBACD,KAAK,EAAE,aAAa,CAAC,KAAK;gBAC1B,UAAU,EAAE,aAAa,CAAC,UAAU;gBACpC,KAAK,EAAE,mBAAmB,EAAE;aACtB,CAAC;YAET,OAAO,MAAM,CAAC;QAChB,CAAC,CACF,CAAC;QACF,aAAa,GAAG,IAAI,CAAC;IACvB,CAAC;IAED,0EAA0E;IAC1E,4EAA4E;IAC5E,yEAAyE;IACzE,4DAA4D;IAC5D,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,WAAW,GAAG,MAAM,CAAC,cAAc,CACvC,0CAA0C,EAC1C,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,2BAA2B,EAAE,EAChE,KAAK,IAA8B,EAAE,CAAC,CAAC;YACrC,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC;SAClE,CAAC,CACH,CAAC;QACF,WAAW,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource annotations for SquadRules MCP resources.
|
|
3
|
+
*
|
|
4
|
+
* Annotations provide metadata about resources based on the MCP 2026-07-28 spec:
|
|
5
|
+
* - audience: Who the resource is intended for ('user' | 'assistant')
|
|
6
|
+
* - priority: Numeric priority (higher = more important, 0.0-1.0 normalized)
|
|
7
|
+
* - lastModified: ISO 8601 timestamp of last modification
|
|
8
|
+
*
|
|
9
|
+
* These help agents decide which resources to consult first.
|
|
10
|
+
*/
|
|
11
|
+
export interface ResourceAnnotations {
|
|
12
|
+
audience?: ('user' | 'assistant')[];
|
|
13
|
+
priority?: number;
|
|
14
|
+
lastModified?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Annotations for each resource category.
|
|
18
|
+
*
|
|
19
|
+
* Embedded docs are assistant-facing (used by agents to understand the system)
|
|
20
|
+
* and versioned with the codebase. Priority reflects how often agents should
|
|
21
|
+
* consult each resource type.
|
|
22
|
+
*/
|
|
23
|
+
export declare const RESOURCE_ANNOTATIONS: Record<string, ResourceAnnotations>;
|
|
24
|
+
/**
|
|
25
|
+
* Get annotations for a resource by category and filename.
|
|
26
|
+
* Falls back to category-level annotations if no specific override exists.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getResourceAnnotations(category: string, _filename?: string): ResourceAnnotations;
|
|
29
|
+
//# sourceMappingURL=resource-annotations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-annotations.d.ts","sourceRoot":"","sources":["../../src/resources/resource-annotations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,CAAC,MAAM,GAAG,WAAW,CAAC,EAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CA+B3D,CAAC;AAEX;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAMhG"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource annotations for SquadRules MCP resources.
|
|
3
|
+
*
|
|
4
|
+
* Annotations provide metadata about resources based on the MCP 2026-07-28 spec:
|
|
5
|
+
* - audience: Who the resource is intended for ('user' | 'assistant')
|
|
6
|
+
* - priority: Numeric priority (higher = more important, 0.0-1.0 normalized)
|
|
7
|
+
* - lastModified: ISO 8601 timestamp of last modification
|
|
8
|
+
*
|
|
9
|
+
* These help agents decide which resources to consult first.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Annotations for each resource category.
|
|
13
|
+
*
|
|
14
|
+
* Embedded docs are assistant-facing (used by agents to understand the system)
|
|
15
|
+
* and versioned with the codebase. Priority reflects how often agents should
|
|
16
|
+
* consult each resource type.
|
|
17
|
+
*/
|
|
18
|
+
export const RESOURCE_ANNOTATIONS = {
|
|
19
|
+
// Tools documentation: high priority, assistant-facing
|
|
20
|
+
'tools': {
|
|
21
|
+
audience: ['assistant'],
|
|
22
|
+
priority: 0.9,
|
|
23
|
+
lastModified: new Date().toISOString()
|
|
24
|
+
},
|
|
25
|
+
// Mem documentation: medium priority, assistant-facing
|
|
26
|
+
'mem': {
|
|
27
|
+
audience: ['assistant'],
|
|
28
|
+
priority: 0.7,
|
|
29
|
+
lastModified: new Date().toISOString()
|
|
30
|
+
},
|
|
31
|
+
// Meta documentation: medium priority, assistant-facing
|
|
32
|
+
'meta': {
|
|
33
|
+
audience: ['assistant'],
|
|
34
|
+
priority: 0.6,
|
|
35
|
+
lastModified: new Date().toISOString()
|
|
36
|
+
},
|
|
37
|
+
// General resources: lower priority
|
|
38
|
+
'resources': {
|
|
39
|
+
audience: ['assistant'],
|
|
40
|
+
priority: 0.5,
|
|
41
|
+
lastModified: new Date().toISOString()
|
|
42
|
+
},
|
|
43
|
+
// Templates: low priority, assistant-facing
|
|
44
|
+
'templates': {
|
|
45
|
+
audience: ['assistant'],
|
|
46
|
+
priority: 0.4,
|
|
47
|
+
lastModified: new Date().toISOString()
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Get annotations for a resource by category and filename.
|
|
52
|
+
* Falls back to category-level annotations if no specific override exists.
|
|
53
|
+
*/
|
|
54
|
+
export function getResourceAnnotations(category, _filename) {
|
|
55
|
+
return RESOURCE_ANNOTATIONS[category] || {
|
|
56
|
+
audience: ['assistant'],
|
|
57
|
+
priority: 0.5,
|
|
58
|
+
lastModified: new Date().toISOString()
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=resource-annotations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-annotations.js","sourceRoot":"","sources":["../../src/resources/resource-annotations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAwC;IACvE,uDAAuD;IACvD,OAAO,EAAE;QACP,QAAQ,EAAE,CAAC,WAAW,CAAC;QACvB,QAAQ,EAAE,GAAG;QACb,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACvC;IACD,uDAAuD;IACvD,KAAK,EAAE;QACL,QAAQ,EAAE,CAAC,WAAW,CAAC;QACvB,QAAQ,EAAE,GAAG;QACb,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACvC;IACD,wDAAwD;IACxD,MAAM,EAAE;QACN,QAAQ,EAAE,CAAC,WAAW,CAAC;QACvB,QAAQ,EAAE,GAAG;QACb,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACvC;IACD,oCAAoC;IACpC,WAAW,EAAE;QACX,QAAQ,EAAE,CAAC,WAAW,CAAC;QACvB,QAAQ,EAAE,GAAG;QACb,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACvC;IACD,4CAA4C;IAC5C,WAAW,EAAE;QACX,QAAQ,EAAE,CAAC,WAAW,CAAC;QACvB,QAAQ,EAAE,GAAG;QACb,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACvC;CACO,CAAC;AAEX;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAAgB,EAAE,SAAkB;IACzE,OAAO,oBAAoB,CAAC,QAAQ,CAAC,IAAI;QACvC,QAAQ,EAAE,CAAC,WAAW,CAAC;QACvB,QAAQ,EAAE,GAAG;QACb,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACvC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource descriptions for SquadRules MCP resources.
|
|
3
|
+
*
|
|
4
|
+
* Provides real descriptions (not template-derived) for resources.
|
|
5
|
+
* Descriptions are sourced from the document's H1 + first paragraph where possible,
|
|
6
|
+
* or hand-written where that is not meaningful.
|
|
7
|
+
*/
|
|
8
|
+
export interface ResourceDescription {
|
|
9
|
+
description: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Descriptions for each resource by category and filename.
|
|
14
|
+
*
|
|
15
|
+
* These replace the template "Documentation for ${name}" with meaningful
|
|
16
|
+
* descriptions that help agents decide which resources to consult.
|
|
17
|
+
*/
|
|
18
|
+
export declare const RESOURCE_DESCRIPTIONS: Record<string, Record<string, ResourceDescription>>;
|
|
19
|
+
/**
|
|
20
|
+
* Get description for a resource by category and filename.
|
|
21
|
+
* Falls back to a generated description if no specific override exists.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getResourceDescription(category: string, filename: string, fallbackName: string): ResourceDescription;
|
|
24
|
+
//# sourceMappingURL=resource-descriptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-descriptions.d.ts","sourceRoot":"","sources":["../../src/resources/resource-descriptions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAkF5E,CAAC;AAEX;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,mBAAmB,CAWpH"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource descriptions for SquadRules MCP resources.
|
|
3
|
+
*
|
|
4
|
+
* Provides real descriptions (not template-derived) for resources.
|
|
5
|
+
* Descriptions are sourced from the document's H1 + first paragraph where possible,
|
|
6
|
+
* or hand-written where that is not meaningful.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Descriptions for each resource by category and filename.
|
|
10
|
+
*
|
|
11
|
+
* These replace the template "Documentation for ${name}" with meaningful
|
|
12
|
+
* descriptions that help agents decide which resources to consult.
|
|
13
|
+
*/
|
|
14
|
+
export const RESOURCE_DESCRIPTIONS = {
|
|
15
|
+
tools: {
|
|
16
|
+
activate: {
|
|
17
|
+
title: 'Activate Tool Guide',
|
|
18
|
+
description: 'Rank stored adapters for user intent and return the next forward call arguments. Use this tool to find the best-matching adapter for any action, task, or workflow.'
|
|
19
|
+
},
|
|
20
|
+
forward: {
|
|
21
|
+
title: 'Forward Tool Guide',
|
|
22
|
+
description: 'Execute the next step in an adapter workflow. Copy the forward_first_call from activate results directly into this tool to advance the chain.'
|
|
23
|
+
},
|
|
24
|
+
train: {
|
|
25
|
+
title: 'Train Tool Guide',
|
|
26
|
+
description: 'Create or update adapters in the local store. Use this to teach SquadRules new workflows or refine existing ones with better instructions.'
|
|
27
|
+
},
|
|
28
|
+
reward: {
|
|
29
|
+
title: 'Reward Tool Guide',
|
|
30
|
+
description: 'Record success or failure signals for adapter executions. Helps the system learn which adapters work best for different scenarios.'
|
|
31
|
+
},
|
|
32
|
+
tune: {
|
|
33
|
+
title: 'Tune Tool Guide',
|
|
34
|
+
description: 'Update existing adapter content layer by layer. Use this to refine adapter instructions without creating a new adapter from scratch.'
|
|
35
|
+
},
|
|
36
|
+
delete: {
|
|
37
|
+
title: 'Delete Tool Guide',
|
|
38
|
+
description: 'Remove adapters or specific layers from the store. Use with caution as deletion is permanent.'
|
|
39
|
+
},
|
|
40
|
+
export: {
|
|
41
|
+
title: 'Export Tool Guide',
|
|
42
|
+
description: 'Export adapter or training data in various formats. Use this to backup adapters, share them, or inspect their structure.'
|
|
43
|
+
},
|
|
44
|
+
spaces: {
|
|
45
|
+
title: 'Spaces Tool Guide',
|
|
46
|
+
description: 'List available spaces and adapter counts. Shows the organizational structure for adapters (personal, shared, group spaces).'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
mem: {
|
|
50
|
+
'adapter-migration': {
|
|
51
|
+
title: 'Adapter Migration Guide',
|
|
52
|
+
description: 'Procedures for migrating adapters between versions or systems. Covers data format changes and version continuity.'
|
|
53
|
+
},
|
|
54
|
+
'author-adapter': {
|
|
55
|
+
title: 'Authoring Adapters',
|
|
56
|
+
description: 'Step-by-step guide for creating new adapters from scratch. Covers structure, best practices, and testing.'
|
|
57
|
+
},
|
|
58
|
+
'bulk-insert-adapters-via-cli': {
|
|
59
|
+
title: 'Bulk Adapter Insertion',
|
|
60
|
+
description: 'Command-line methods for inserting multiple adapters at once. Useful for initial setup or large-scale imports.'
|
|
61
|
+
},
|
|
62
|
+
'challenge-type-guide': {
|
|
63
|
+
title: 'Challenge Type Guide',
|
|
64
|
+
description: 'Explanation of challenge types in SquadRules and how they affect adapter selection and execution.'
|
|
65
|
+
},
|
|
66
|
+
'critic-loop-guide': {
|
|
67
|
+
title: 'Critic Loop Guide',
|
|
68
|
+
description: 'Overview of the critic loop pattern for iterative refinement. Shows how adapters can self-improve through feedback.'
|
|
69
|
+
},
|
|
70
|
+
'critic-loop': {
|
|
71
|
+
title: 'Critic Loop Implementation',
|
|
72
|
+
description: 'Technical details of critic loop implementation. Covers the activate-forward-reward cycle for self-improvement.'
|
|
73
|
+
},
|
|
74
|
+
'protocol-linking-guide': {
|
|
75
|
+
title: 'Protocol Linking Guide',
|
|
76
|
+
description: 'How to link adapters together using protocol references. Enables composition of complex workflows from simple adapters.'
|
|
77
|
+
},
|
|
78
|
+
'README': {
|
|
79
|
+
title: 'Memory Documentation',
|
|
80
|
+
description: 'Overview of the SquadRules memory system and adapter storage. Entry point for understanding how adapters are organized.'
|
|
81
|
+
},
|
|
82
|
+
'refine-search': {
|
|
83
|
+
title: 'Search Refinement',
|
|
84
|
+
description: 'Techniques for refining adapter searches when initial results are weak. Covers query improvement and space filtering.'
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
meta: {
|
|
88
|
+
// Meta resources are keyed by slug, descriptions can be added as needed
|
|
89
|
+
},
|
|
90
|
+
resources: {
|
|
91
|
+
// General resources can be added here
|
|
92
|
+
},
|
|
93
|
+
templates: {
|
|
94
|
+
// Template resources can be added here
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Get description for a resource by category and filename.
|
|
99
|
+
* Falls back to a generated description if no specific override exists.
|
|
100
|
+
*/
|
|
101
|
+
export function getResourceDescription(category, filename, fallbackName) {
|
|
102
|
+
const categoryDescs = RESOURCE_DESCRIPTIONS[category];
|
|
103
|
+
if (categoryDescs && categoryDescs[filename]) {
|
|
104
|
+
return categoryDescs[filename];
|
|
105
|
+
}
|
|
106
|
+
// Fallback: generate a reasonable description from the name
|
|
107
|
+
return {
|
|
108
|
+
title: fallbackName,
|
|
109
|
+
description: `SquadRules ${category} documentation: ${fallbackName}`
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=resource-descriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-descriptions.js","sourceRoot":"","sources":["../../src/resources/resource-descriptions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAwD;IACxF,KAAK,EAAE;QACL,QAAQ,EAAE;YACR,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EAAE,qKAAqK;SACnL;QACD,OAAO,EAAE;YACP,KAAK,EAAE,oBAAoB;YAC3B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EAAE;IACJ,wEAAwE;KACzE;IACD,SAAS,EAAE;IACT,sCAAsC;KACvC;IACD,SAAS,EAAE;IACT,uCAAuC;KACxC;CACO,CAAC;AAEX;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAAgB,EAAE,QAAgB,EAAE,YAAoB;IAC7F,MAAM,aAAa,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACtD,IAAI,aAAa,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7C,OAAO,aAAa,CAAC,QAAQ,CAAE,CAAC;IAClC,CAAC;IAED,4DAA4D;IAC5D,OAAO;QACL,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,cAAc,QAAQ,mBAAmB,YAAY,EAAE;KACrE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource icons for SquadRules MCP resources.
|
|
3
|
+
*
|
|
4
|
+
* Each resource category has a meaningful icon encoded as a data URI (image/svg+xml).
|
|
5
|
+
* The MCP 2026-07-28 spec requires at minimum image/png at 48x48, but
|
|
6
|
+
* SVG is more flexible and scales better. We provide SVG icons.
|
|
7
|
+
*/
|
|
8
|
+
export declare const TOOLS_DOC_ICON: string;
|
|
9
|
+
export declare const MEM_ICON: string;
|
|
10
|
+
export declare const META_ICON: string;
|
|
11
|
+
export declare const RESOURCE_ICON: string;
|
|
12
|
+
export declare const TEMPLATE_ICON: string;
|
|
13
|
+
/**
|
|
14
|
+
* Icon metadata for each resource category - follows MCP 2026-07-28 spec.
|
|
15
|
+
* Each entry provides an SVG icon at 48x48.
|
|
16
|
+
*/
|
|
17
|
+
export declare const RESOURCE_ICONS: Record<string, Array<{
|
|
18
|
+
src: string;
|
|
19
|
+
mimeType: string;
|
|
20
|
+
sizes: string[];
|
|
21
|
+
}>>;
|
|
22
|
+
/**
|
|
23
|
+
* Get icons for a resource by category.
|
|
24
|
+
* Falls back to generic resource icon if no specific icon exists.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getResourceIcons(category: string): Array<{
|
|
27
|
+
src: string;
|
|
28
|
+
mimeType: string;
|
|
29
|
+
sizes: string[];
|
|
30
|
+
}>;
|
|
31
|
+
//# sourceMappingURL=resource-icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-icons.d.ts","sourceRoot":"","sources":["../../src/resources/resource-icons.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,eAAO,MAAM,cAAc,QAKzB,CAAC;AAGH,eAAO,MAAM,QAAQ,QAOnB,CAAC;AAGH,eAAO,MAAM,SAAS,QAKpB,CAAC;AAGH,eAAO,MAAM,aAAa,QAQxB,CAAC;AAGH,eAAO,MAAM,aAAa,QAMxB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAM3F,CAAC;AAEX;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAE5G"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource icons for SquadRules MCP resources.
|
|
3
|
+
*
|
|
4
|
+
* Each resource category has a meaningful icon encoded as a data URI (image/svg+xml).
|
|
5
|
+
* The MCP 2026-07-28 spec requires at minimum image/png at 48x48, but
|
|
6
|
+
* SVG is more flexible and scales better. We provide SVG icons.
|
|
7
|
+
*/
|
|
8
|
+
const createSvgDataUri = (svgContent) => {
|
|
9
|
+
const encoded = encodeURIComponent(svgContent.trim());
|
|
10
|
+
return `data:image/svg+xml,${encoded}`;
|
|
11
|
+
};
|
|
12
|
+
// tools: book/documentation icon (open book)
|
|
13
|
+
export const TOOLS_DOC_ICON = createSvgDataUri(`
|
|
14
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#2196F3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
15
|
+
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/>
|
|
16
|
+
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>
|
|
17
|
+
</svg>
|
|
18
|
+
`);
|
|
19
|
+
// mem: brain/memory icon (brain)
|
|
20
|
+
export const MEM_ICON = createSvgDataUri(`
|
|
21
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#9C27B0" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
22
|
+
<path d="M12 2a4 4 0 0 1 4 4c0 1.1-.9 2-2 2h-4c-1.1 0-2-.9-2-2a4 4 0 0 1 4-4z"/>
|
|
23
|
+
<path d="M8 8v6c0 2.2 1.8 4 4 4s4-1.8 4-4V8"/>
|
|
24
|
+
<path d="M12 18v4"/>
|
|
25
|
+
<path d="M8 12h8"/>
|
|
26
|
+
</svg>
|
|
27
|
+
`);
|
|
28
|
+
// meta: info/settings icon (gear)
|
|
29
|
+
export const META_ICON = createSvgDataUri(`
|
|
30
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#607D8B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
31
|
+
<path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/>
|
|
32
|
+
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/>
|
|
33
|
+
</svg>
|
|
34
|
+
`);
|
|
35
|
+
// resources: file/document icon (file text)
|
|
36
|
+
export const RESOURCE_ICON = createSvgDataUri(`
|
|
37
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#4CAF50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
38
|
+
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
|
|
39
|
+
<polyline points="14 2 14 8 20 8"/>
|
|
40
|
+
<line x1="16" x2="8" y1="13" y2="13"/>
|
|
41
|
+
<line x1="16" x2="8" y1="17" y2="17"/>
|
|
42
|
+
<polyline points="10 9 9 9 8 9"/>
|
|
43
|
+
</svg>
|
|
44
|
+
`);
|
|
45
|
+
// templates: layout/template icon (layout)
|
|
46
|
+
export const TEMPLATE_ICON = createSvgDataUri(`
|
|
47
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#FF9800" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
48
|
+
<rect width="18" height="18" x="3" y="3" rx="2" ry="2"/>
|
|
49
|
+
<line x1="3" x2="21" y1="9" y2="9"/>
|
|
50
|
+
<line x1="9" x2="9" y1="21" y2="9"/>
|
|
51
|
+
</svg>
|
|
52
|
+
`);
|
|
53
|
+
/**
|
|
54
|
+
* Icon metadata for each resource category - follows MCP 2026-07-28 spec.
|
|
55
|
+
* Each entry provides an SVG icon at 48x48.
|
|
56
|
+
*/
|
|
57
|
+
export const RESOURCE_ICONS = {
|
|
58
|
+
tools: [{ src: TOOLS_DOC_ICON, mimeType: 'image/svg+xml', sizes: ['48x48'] }],
|
|
59
|
+
mem: [{ src: MEM_ICON, mimeType: 'image/svg+xml', sizes: ['48x48'] }],
|
|
60
|
+
meta: [{ src: META_ICON, mimeType: 'image/svg+xml', sizes: ['48x48'] }],
|
|
61
|
+
resources: [{ src: RESOURCE_ICON, mimeType: 'image/svg+xml', sizes: ['48x48'] }],
|
|
62
|
+
templates: [{ src: TEMPLATE_ICON, mimeType: 'image/svg+xml', sizes: ['48x48'] }]
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Get icons for a resource by category.
|
|
66
|
+
* Falls back to generic resource icon if no specific icon exists.
|
|
67
|
+
*/
|
|
68
|
+
export function getResourceIcons(category) {
|
|
69
|
+
return RESOURCE_ICONS[category] || RESOURCE_ICONS['resources'];
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=resource-icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-icons.js","sourceRoot":"","sources":["../../src/resources/resource-icons.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,gBAAgB,GAAG,CAAC,UAAkB,EAAU,EAAE;IACtD,MAAM,OAAO,GAAG,kBAAkB,CAA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;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAgB;IAC/C,OAAO,cAAc,CAAC,QAAQ,CAAC,IAAI,cAAc,CAAC,WAAW,CAAE,CAAC;AAClE,CAAC"}
|
package/dist/runtime-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squadrules/mcp",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.22.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@squadrules/mcp",
|
|
9
|
-
"version": "5.
|
|
9
|
+
"version": "5.22.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@exodus/bytes": "^1.16.0",
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAMzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAMzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAsL/D,wBAAgB,YAAY,CAAC,WAAW,EAAE,iBAAiB,GAAG,SAAS,CA8EtE"}
|