pipcode 2.1.0 → 2.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipcode",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "PipCode — architecture, security and quality rules for your AI coding assistants (MCP server).",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,33 +1,33 @@
1
- // src/mcp/server-create.js — Création du Server MCP + capture de l'agent hôte
2
- // (clientInfo à l'initialize — gap d'audit #1) + handlers tools/list et tools/call.
3
- // Extrait de server-main.js (plafond de lignes) : main() reste un réorienteur.
4
-
5
- import { Server } from "@modelcontextprotocol/sdk/server/index.js";
6
- import { ListToolsRequestSchema, CallToolRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema } from "@modelcontextprotocol/sdk/types.js";
7
- import { handleListTools } from "./handle-list.js";
8
- import { handleCallTool } from "./call-tool.js";
9
- import { rememberClient } from "./client-info.js";
10
- import { LICENCE_PROMPT, getPrompt } from "./prompt-licence.js";
11
-
12
- // Crée le Server, y branche les handlers et capture l'agent hôte (multi-agent
13
- // natif → PipCode lui laisse la délégation au lieu de doubler l'orchestration).
14
- /** @returns {Server} */
15
- export function createPlugServer() {
16
- const server = new Server(
17
- { name: "virtual-cto-skills", version: "2.0.0" },
18
- { capabilities: { tools: {}, prompts: {} } }
19
- );
20
- server.setRequestHandler(ListToolsRequestSchema, handleListTools);
21
- server.setRequestHandler(CallToolRequestSchema, handleCallTool);
22
- server.setRequestHandler(ListPromptsRequestSchema, async () => ({ prompts: [LICENCE_PROMPT] }));
23
- server.setRequestHandler(GetPromptRequestSchema, async (request) => {
24
- const prompt = getPrompt(request.params.name);
25
- if (!prompt) throw new Error(`Invite inconnue : ${request.params.name}`);
26
- return prompt;
27
- });
28
- server.oninitialized = () => {
29
- try { rememberClient(server.getClientVersion()); } catch { /* best-effort : sans clientInfo, pas de délégation */ }
30
- };
31
- return server;
32
- }
1
+ // src/mcp/server-create.js — Création du Server MCP + capture de l'agent hôte
2
+ // (clientInfo à l'initialize — gap d'audit #1) + handlers tools/list et tools/call.
3
+ // Extrait de server-main.js (plafond de lignes) : main() reste un réorienteur.
4
+
5
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
6
+ import { ListToolsRequestSchema, CallToolRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema } from "@modelcontextprotocol/sdk/types.js";
7
+ import { handleListTools } from "./handle-list.js";
8
+ import { handleCallTool } from "./call-tool.js";
9
+ import { rememberClient } from "./client-info.js";
10
+ import { LICENCE_PROMPT, getPrompt } from "./prompt-licence.js";
11
+
12
+ // Crée le Server, y branche les handlers et capture l'agent hôte (multi-agent
13
+ // natif → PipCode lui laisse la délégation au lieu de doubler l'orchestration).
14
+ /** @returns {Server} */
15
+ export function createPlugServer() {
16
+ const server = new Server(
17
+ { name: "pipcode-skills", version: "2.0.0" },
18
+ { capabilities: { tools: {}, prompts: {} } }
19
+ );
20
+ server.setRequestHandler(ListToolsRequestSchema, handleListTools);
21
+ server.setRequestHandler(CallToolRequestSchema, handleCallTool);
22
+ server.setRequestHandler(ListPromptsRequestSchema, async () => ({ prompts: [LICENCE_PROMPT] }));
23
+ server.setRequestHandler(GetPromptRequestSchema, async (request) => {
24
+ const prompt = getPrompt(request.params.name);
25
+ if (!prompt) throw new Error(`Invite inconnue : ${request.params.name}`);
26
+ return prompt;
27
+ });
28
+ server.oninitialized = () => {
29
+ try { rememberClient(server.getClientVersion()); } catch { /* best-effort : sans clientInfo, pas de délégation */ }
30
+ };
31
+ return server;
32
+ }
33
33
  // MODULE_COMPLETE