|
8 | 8 | * PWA Kit v3 toolset for B2C Commerce. |
9 | 9 | * |
10 | 10 | * This toolset provides MCP tools for PWA Kit v3 development. |
11 | | - * |
12 | | - * > ⚠️ **PLACEHOLDER - ACTIVE DEVELOPMENT** |
13 | | - * > Tools in this module are placeholder implementations that return mock responses. |
14 | | - * > Actual implementations are coming soon. Use `--allow-non-ga-tools` flag to enable. |
| 11 | + * PWA Kit-specific tools are planned for future releases. |
| 12 | + * mrt_bundle_push (from MRT toolset) is available for PWAV3 projects. |
15 | 13 | * |
16 | 14 | * @module tools/pwav3 |
17 | 15 | */ |
18 | 16 |
|
19 | | -import {z} from 'zod'; |
20 | | -import type {McpTool, Toolset} from '../../utils/index.js'; |
| 17 | +import type {McpTool} from '../../utils/index.js'; |
21 | 18 | import type {Services} from '../../services.js'; |
22 | | -import {createToolAdapter, jsonResult} from '../adapter.js'; |
23 | | - |
24 | | -/** |
25 | | - * Common input type for placeholder tools. |
26 | | - */ |
27 | | -interface PlaceholderInput { |
28 | | - message?: string; |
29 | | -} |
30 | | - |
31 | | -/** |
32 | | - * Common output type for placeholder tools. |
33 | | - */ |
34 | | -interface PlaceholderOutput { |
35 | | - tool: string; |
36 | | - status: string; |
37 | | - message: string; |
38 | | - input: PlaceholderInput; |
39 | | - timestamp: string; |
40 | | -} |
41 | | - |
42 | | -/** |
43 | | - * Creates a placeholder tool for PWA Kit development. |
44 | | - * |
45 | | - * Placeholder tools log invocations and return mock responses until |
46 | | - * the actual implementation is available. |
47 | | - * |
48 | | - * @param name - Tool name |
49 | | - * @param description - Tool description |
50 | | - * @param toolsets - Toolsets this tool belongs to |
51 | | - * @param loadServices - Function that loads configuration and returns Services instance |
52 | | - * @returns The configured MCP tool |
53 | | - */ |
54 | | -function createPlaceholderTool( |
55 | | - name: string, |
56 | | - description: string, |
57 | | - toolsets: Toolset[], |
58 | | - loadServices: () => Services, |
59 | | -): McpTool { |
60 | | - return createToolAdapter<PlaceholderInput, PlaceholderOutput>( |
61 | | - { |
62 | | - name, |
63 | | - description: `[PLACEHOLDER] ${description}`, |
64 | | - toolsets, |
65 | | - isGA: false, |
66 | | - requiresInstance: false, |
67 | | - inputSchema: { |
68 | | - message: z.string().optional().describe('Optional message to echo'), |
69 | | - }, |
70 | | - async execute(args) { |
71 | | - // Placeholder implementation |
72 | | - const timestamp = new Date().toISOString(); |
73 | | - |
74 | | - return { |
75 | | - tool: name, |
76 | | - status: 'placeholder', |
77 | | - message: `This is a placeholder implementation for '${name}'. The actual implementation is coming soon.`, |
78 | | - input: args, |
79 | | - timestamp, |
80 | | - }; |
81 | | - }, |
82 | | - formatOutput: (output) => jsonResult(output), |
83 | | - }, |
84 | | - loadServices, |
85 | | - ); |
86 | | -} |
87 | 19 |
|
88 | 20 | /** |
89 | 21 | * Creates all tools for the PWAV3 toolset. |
90 | 22 | * |
91 | | - * Note: mrt_bundle_push is defined in the MRT toolset with |
92 | | - * toolsets: ["MRT", "PWAV3", "STOREFRONTNEXT"] and will |
93 | | - * automatically appear in PWAV3. |
| 23 | + * PWA Kit-specific tools are not yet implemented. mrt_bundle_push is defined |
| 24 | + * in the MRT toolset with toolsets: ["MRT", "PWAV3", "STOREFRONTNEXT"] and |
| 25 | + * automatically appears in PWAV3 for bundle deployment. |
94 | 26 | * |
95 | | - * @param loadServices - Function that loads configuration and returns Services instance |
96 | | - * @returns Array of MCP tools |
| 27 | + * @param _loadServices - Function that loads configuration and returns Services instance |
| 28 | + * @returns Array of MCP tools (empty until PWA Kit tools are implemented) |
97 | 29 | */ |
98 | | -export function createPwav3Tools(loadServices: () => Services): McpTool[] { |
99 | | - return [ |
100 | | - // PWA Kit development tools |
101 | | - createPlaceholderTool( |
102 | | - 'pwakit_create_storefront', |
103 | | - 'Create a new PWA Kit storefront project', |
104 | | - ['PWAV3'], |
105 | | - loadServices, |
106 | | - ), |
107 | | - createPlaceholderTool( |
108 | | - 'pwakit_create_page', |
109 | | - 'Create a new page component in PWA Kit project', |
110 | | - ['PWAV3'], |
111 | | - loadServices, |
112 | | - ), |
113 | | - createPlaceholderTool( |
114 | | - 'pwakit_create_component', |
115 | | - 'Create a new React component in PWA Kit project', |
116 | | - ['PWAV3'], |
117 | | - loadServices, |
118 | | - ), |
119 | | - createPlaceholderTool( |
120 | | - 'pwakit_get_dev_guidelines', |
121 | | - 'Get PWA Kit development guidelines and best practices', |
122 | | - ['PWAV3'], |
123 | | - loadServices, |
124 | | - ), |
125 | | - createPlaceholderTool( |
126 | | - 'pwakit_recommend_hooks', |
127 | | - 'Recommend appropriate React hooks for PWA Kit use cases', |
128 | | - ['PWAV3'], |
129 | | - loadServices, |
130 | | - ), |
131 | | - createPlaceholderTool('pwakit_run_site_test', 'Run site tests for PWA Kit project', ['PWAV3'], loadServices), |
132 | | - createPlaceholderTool( |
133 | | - 'pwakit_install_agent_rules', |
134 | | - 'Install AI agent rules for PWA Kit development', |
135 | | - ['PWAV3'], |
136 | | - loadServices, |
137 | | - ), |
138 | | - createPlaceholderTool( |
139 | | - 'pwakit_explore_scapi_shop_api', |
140 | | - 'Explore SCAPI Shop API endpoints and capabilities', |
141 | | - ['PWAV3'], |
142 | | - loadServices, |
143 | | - ), |
144 | | - ]; |
| 30 | +export function createPwav3Tools(_loadServices: () => Services): McpTool[] { |
| 31 | + return []; |
145 | 32 | } |
0 commit comments