@swizzyai/swizzy-ai-skill 0.1.2
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/LICENSE +193 -0
- package/README.md +129 -0
- package/dist/index.js +604 -0
- package/dist/index.js.map +1 -0
- package/package.json +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship made available under
|
|
36
|
+
the License, as indicated by a copyright notice that is included in
|
|
37
|
+
or attached to the work (an example is provided in the Appendix below).
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
43
|
+
of this License, Derivative Works shall not include works that remain
|
|
44
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
45
|
+
the Work and derivative works thereof.
|
|
46
|
+
|
|
47
|
+
"Contribution" shall mean, as submitted to the Licensor for inclusion
|
|
48
|
+
in the Work by the copyright owner or by an individual or Legal Entity
|
|
49
|
+
authorized to submit on behalf of the copyright owner. For the purposes
|
|
50
|
+
of this definition, "submitted" means any form of electronic, verbal,
|
|
51
|
+
or written communication sent to the Licensor or its representatives,
|
|
52
|
+
including but not limited to communication on electronic mailing lists,
|
|
53
|
+
source code control systems, and issue tracking systems that are managed
|
|
54
|
+
by, or on behalf of, the Licensor for the purpose of discussing and
|
|
55
|
+
improving the Work, but excluding communication that is conspicuously
|
|
56
|
+
marked or designated in writing by the copyright owner as "Not a
|
|
57
|
+
Contribution."
|
|
58
|
+
|
|
59
|
+
"Contributor" shall mean Licensor and any Legal Entity on behalf of
|
|
60
|
+
whom a Contribution has been received by the Licensor and incorporated
|
|
61
|
+
within the Work.
|
|
62
|
+
|
|
63
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
64
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
65
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
66
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
67
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
68
|
+
Work and such Derivative Works in Source or Object form.
|
|
69
|
+
|
|
70
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
71
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
72
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
73
|
+
(except as stated in this section) patent license to make, have made,
|
|
74
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
75
|
+
where such license applies only to those patent claims licensable
|
|
76
|
+
by such Contributor that are necessarily infringed by their
|
|
77
|
+
Contribution(s) alone or by the combined work of their Contribution(s)
|
|
78
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
79
|
+
institute patent litigation against any entity (including a cross-claim
|
|
80
|
+
or counterclaim in a lawsuit) alleging that the Work or any
|
|
81
|
+
Contributor's Contributions constitutes patent or contributory
|
|
82
|
+
patent infringement, then any patent licenses granted to You under
|
|
83
|
+
this License for that Work shall terminate as of the date such
|
|
84
|
+
litigation is filed.
|
|
85
|
+
|
|
86
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
87
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
88
|
+
modifications, and in Source or Object form, provided that You
|
|
89
|
+
meet the following conditions:
|
|
90
|
+
|
|
91
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
92
|
+
Works a copy of this License; and
|
|
93
|
+
|
|
94
|
+
(b) You must cause any modified files to carry prominent notices
|
|
95
|
+
stating that You changed the files; and
|
|
96
|
+
|
|
97
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
98
|
+
that You distribute, all copyright, patent, trademark, and
|
|
99
|
+
attribution notices from the Source form of the Work,
|
|
100
|
+
excluding those notices that do not pertain to any part of
|
|
101
|
+
the Derivative Works; and
|
|
102
|
+
|
|
103
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
104
|
+
distribution, You must include a readable copy of the
|
|
105
|
+
attribution notices contained within such NOTICE file, in
|
|
106
|
+
at least one of the following places: within a NOTICE text
|
|
107
|
+
file distributed as part of the Derivative Works; within
|
|
108
|
+
the Source form or documentation, if provided along with the
|
|
109
|
+
Derivative Works; or, within a display generated by the
|
|
110
|
+
Derivative Works, if and wherever such third-party notices
|
|
111
|
+
normally appear. The contents of the NOTICE file are for
|
|
112
|
+
informational purposes only and do not modify the License.
|
|
113
|
+
You may add Your own attribution notices within Derivative
|
|
114
|
+
Works that You distribute, alongside or as an addendum to
|
|
115
|
+
the NOTICE text from the Work, provided that such additional
|
|
116
|
+
attribution notices cannot be construed as modifying the
|
|
117
|
+
License.
|
|
118
|
+
|
|
119
|
+
You may add Your own license statement for Your modifications and
|
|
120
|
+
may provide additional grant of rights to use, copy, modify, merge,
|
|
121
|
+
publish, distribute, sublicense, and/or sell copies of the Work
|
|
122
|
+
and such Derivative Works, and to permit persons to whom the Work
|
|
123
|
+
is furnished to do so.
|
|
124
|
+
|
|
125
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
126
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
127
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
128
|
+
this License, without any additional terms or conditions.
|
|
129
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
130
|
+
the terms of any separate license agreement you may have executed
|
|
131
|
+
with Licensor regarding such Contributions.
|
|
132
|
+
|
|
133
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
134
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
135
|
+
except as required for reasonable and customary use in describing the
|
|
136
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
137
|
+
|
|
138
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
139
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
140
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
141
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
142
|
+
implied, including, without limitation, any conditions of title,
|
|
143
|
+
non-infringement, merchantability, or fitness for a particular
|
|
144
|
+
purpose. You are solely responsible for determining the
|
|
145
|
+
appropriateness of using or redistributing the Work and assume any
|
|
146
|
+
risks associated with Your exercise of permissions under this License.
|
|
147
|
+
|
|
148
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
149
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
150
|
+
unless required by applicable law (such as deliberate and grossly
|
|
151
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
152
|
+
liable to You for damages, including any direct, indirect, special,
|
|
153
|
+
incidental, or exemplary damages of any character arising as a
|
|
154
|
+
result of this License or out of the use or inability to use the
|
|
155
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
156
|
+
work stoppage, computer failure or malfunction, or all other
|
|
157
|
+
commercial damages or losses), even if such Contributor has been
|
|
158
|
+
advised of the possibility of such damages.
|
|
159
|
+
|
|
160
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
161
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
162
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
163
|
+
or other liability obligations and/or rights consistent with this
|
|
164
|
+
License. However, in accepting such obligations, You may act only
|
|
165
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
166
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
167
|
+
defend, and hold each Contributor harmless for any liability
|
|
168
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
169
|
+
of your accepting any such warranty or additional liability.
|
|
170
|
+
|
|
171
|
+
END OF TERMS AND CONDITIONS
|
|
172
|
+
|
|
173
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
174
|
+
|
|
175
|
+
To apply the Apache License to your work, attach the following
|
|
176
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
177
|
+
replaced with your own identifying information. (Don't include
|
|
178
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
179
|
+
comment syntax for the file format in question.
|
|
180
|
+
|
|
181
|
+
Copyright 2026 Jason Gallagher
|
|
182
|
+
|
|
183
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
184
|
+
you may not use this file except in compliance with the License.
|
|
185
|
+
You may obtain a copy of the License at
|
|
186
|
+
|
|
187
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
188
|
+
|
|
189
|
+
Unless required by applicable law or agreed to in writing, software
|
|
190
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
191
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
192
|
+
See the License for the specific language governing permissions and
|
|
193
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Swizzy AI Skill
|
|
2
|
+
|
|
3
|
+
AI Agent skill for working with the SwizzyWeb ecosystem. This package provides an **MCP (Model Context Protocol)** server that allows AI agents to scaffold, manage, and refactor Swizzy Web Service projects.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Install the package from the registry:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @swizzyai/swizzy-ai-skill
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or install locally as a project dependency:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @swizzyai/swizzy-ai-skill
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Setup (How to get an AI to use this)
|
|
20
|
+
|
|
21
|
+
To use this skill with an AI agent, you must register it as an MCP server.
|
|
22
|
+
|
|
23
|
+
### 1. Register with Claude Code (CLI)
|
|
24
|
+
Add this to your Claude Code MCP config (run `claude mcp add` or edit `~/.claude/mcp.json`):
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"mcpServers": {
|
|
29
|
+
"swizzy": {
|
|
30
|
+
"command": "npx",
|
|
31
|
+
"args": ["@swizzyai/swizzy-ai-skill"]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. Register with Claude Desktop
|
|
38
|
+
Add this to your configuration file (usually `~/.config/Claude/claude_desktop_config.json`):
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"swizzy": {
|
|
44
|
+
"command": "npx",
|
|
45
|
+
"args": ["@swizzyai/swizzy-ai-skill"]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 3. Register with Gemini CLI
|
|
52
|
+
Run the following command in your terminal:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
gemini mcp add swizzy npx @swizzyai/swizzy-ai-skill
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Usage
|
|
59
|
+
|
|
60
|
+
Once registered, you can talk to your AI agent in natural language. The AI will automatically call the correct Swizzy skill tools.
|
|
61
|
+
|
|
62
|
+
### Examples
|
|
63
|
+
- **Scaffolding:** "Create a new Swizzy backend project named 'StoreManager'."
|
|
64
|
+
- **Adding Features:** "Add a 'Product' router at path '/products' and a 'CreateProduct' POST controller inside it with 'name' and 'price' body fields."
|
|
65
|
+
- **Middleware:** "Add an 'Auth' middleware to the 'CreateProduct' controller."
|
|
66
|
+
- **Management:** "Show me the current project structure."
|
|
67
|
+
- **Refactoring:** "Rename the 'Product' router to 'Inventory'."
|
|
68
|
+
- **Complex Scaffolding:** "Create a new controller named 'UpdateStock' in the 'Inventory' router. It should have a 'quantity' body field and also add 'lastUpdated' to the service state."
|
|
69
|
+
- **OpenAPI:** "Generate an OpenAPI spec for this project and save it to docs/openapi.yaml."
|
|
70
|
+
- **Skeleton:** "Scaffold a new project from my openapi.yaml spec."
|
|
71
|
+
- **Testing:** "Generate test stubs for all controllers."
|
|
72
|
+
- **Running:** "Start the service on port 4000."
|
|
73
|
+
- **Requests:** "Send a POST to the CreateProduct endpoint with name 'Widget' and price 9.99."
|
|
74
|
+
|
|
75
|
+
## Available Tools (Capabilities)
|
|
76
|
+
|
|
77
|
+
> **`cwd` parameter**: All tools accept an optional `cwd` string (absolute path to the project directory). Pass it whenever your project lives in a subdirectory of the MCP server's working directory — which is the typical case when Claude Code opens a parent workspace. Example: `cwd: "/home/user/workspace/my-service"`.
|
|
78
|
+
|
|
79
|
+
### Inspection
|
|
80
|
+
| Tool | Key Parameters | Purpose |
|
|
81
|
+
| :--- | :--- | :--- |
|
|
82
|
+
| `get_project_structure` | `cwd?` | Reads the current routers, controllers, and middleware. |
|
|
83
|
+
|
|
84
|
+
### Scaffolding
|
|
85
|
+
| Tool | Key Parameters | Purpose |
|
|
86
|
+
| :--- | :--- | :--- |
|
|
87
|
+
| `create_web_service` | `name`, `type?`, `cwd?`, `stateFields?`, `serviceArgs?`, `install?` | Initializes a new project from a template. |
|
|
88
|
+
| `create_router` | `name`, `path`, `cwd?`, `stateFields?`, `serviceArgs?` | Adds a new router file and directory. |
|
|
89
|
+
| `create_controller` | `name`, `action`, `router`, `method?`, `cwd?`, `bodyFields?`, `queryParams?` | Adds a controller to an existing router. |
|
|
90
|
+
| `create_middleware` | `name`, `router`, `cwd?`, `controller?` | Generates middleware and attaches it to a router/controller. |
|
|
91
|
+
|
|
92
|
+
### Refactoring
|
|
93
|
+
| Tool | Key Parameters | Purpose |
|
|
94
|
+
| :--- | :--- | :--- |
|
|
95
|
+
| `rename_router` | `oldName`, `newName`, `cwd?` | Renames router and updates all references. |
|
|
96
|
+
| `rename_controller` | `oldName`, `newName`, `router`, `cwd?` | Renames controller and updates all references. |
|
|
97
|
+
| `rename_middleware` | `oldName`, `newName`, `router`, `cwd?` | Renames middleware and updates all references. |
|
|
98
|
+
| `delete_router` | `name`, `cwd?` | Removes router and cleans up registrations. |
|
|
99
|
+
| `delete_controller` | `name`, `router`, `cwd?` | Removes controller and cleans up registrations. |
|
|
100
|
+
| `delete_middleware` | `name`, `router`, `cwd?` | Removes middleware and cleans up registrations. |
|
|
101
|
+
|
|
102
|
+
### Build & Run
|
|
103
|
+
| Tool | Key Parameters | Purpose |
|
|
104
|
+
| :--- | :--- | :--- |
|
|
105
|
+
| `build_service` | `cwd?` | Compiles the TypeScript project. |
|
|
106
|
+
| `run_service` | `cwd?`, `port?` | Starts the service in the background. |
|
|
107
|
+
| `dev_service` | `cwd?`, `port?` | Starts in dev mode with `tsc --watch` and auto-restart. |
|
|
108
|
+
|
|
109
|
+
### OpenAPI
|
|
110
|
+
| Tool | Purpose |
|
|
111
|
+
| :--- | :--- |
|
|
112
|
+
| `generate_spec` | Exports an OpenAPI 3.0 spec from the current project. Accepts `output`, `basePath`, `serverUrl`, `version`, and `json` (for JSON output). |
|
|
113
|
+
| `generate_skeleton` | Scaffolds a new project from an OpenAPI 3.0 spec file. Requires `spec` (file path). Accepts `output`, `name`, `scope`, and `basePath`. |
|
|
114
|
+
|
|
115
|
+
### Testing & Requests
|
|
116
|
+
| Tool | Purpose |
|
|
117
|
+
| :--- | :--- |
|
|
118
|
+
| `generate_tests` | Generates test stubs (happy-path, missing-field, error) for all routers and controllers. |
|
|
119
|
+
| `request` | Sends an HTTP request to a running service. Omit `endpoint` to list all available endpoints. |
|
|
120
|
+
|
|
121
|
+
## Documentation
|
|
122
|
+
- **[README.md](./README.md)**: Human-readable guide (this file).
|
|
123
|
+
- **[AI_USAGE.md](./AI_USAGE.md)**: Expert procedural guidance for the AI agent.
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
Copyright 2024 Jason Gallagher
|
|
128
|
+
|
|
129
|
+
Licensed under the [Apache License, Version 2.0](./LICENSE).
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,604 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Copyright 2024 Jason Gallagher
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
import { spawnSync } from "node:child_process";
|
|
16
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
17
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
18
|
+
import { CallToolRequestSchema, ErrorCode, ListToolsRequestSchema, McpError, } from "@modelcontextprotocol/sdk/types.js";
|
|
19
|
+
import { createWebService } from "@swizzyai/swizzy-web-service-cli/commands/create-web-service";
|
|
20
|
+
import { createRouter } from "@swizzyai/swizzy-web-service-cli/commands/create-router";
|
|
21
|
+
import { createController } from "@swizzyai/swizzy-web-service-cli/commands/create-controller";
|
|
22
|
+
import { createMiddleware } from "@swizzyai/swizzy-web-service-cli/commands/create-middleware";
|
|
23
|
+
import { deleteMiddleware } from "@swizzyai/swizzy-web-service-cli/commands/delete-middleware";
|
|
24
|
+
import { renameMiddleware } from "@swizzyai/swizzy-web-service-cli/commands/rename-middleware";
|
|
25
|
+
import { deleteController } from "@swizzyai/swizzy-web-service-cli/commands/delete-controller";
|
|
26
|
+
import { deleteRouter } from "@swizzyai/swizzy-web-service-cli/commands/delete-router";
|
|
27
|
+
import { renameController } from "@swizzyai/swizzy-web-service-cli/commands/rename-controller";
|
|
28
|
+
import { renameRouter } from "@swizzyai/swizzy-web-service-cli/commands/rename-router";
|
|
29
|
+
import { runService } from "@swizzyai/swizzy-web-service-cli/commands/run-service";
|
|
30
|
+
import { startDevServer } from "@swizzyai/swizzy-web-service-cli/commands/dev-server";
|
|
31
|
+
import { generateTests } from "@swizzyai/swizzy-web-service-cli/commands/generate-tests";
|
|
32
|
+
import { generateSpec } from "@swizzyai/swizzy-web-service-cli/commands/generate-spec";
|
|
33
|
+
import { generateSkeleton } from "@swizzyai/swizzy-web-service-cli/commands/generate-skeleton";
|
|
34
|
+
import { buildEndpoints, sendRequest } from "@swizzyai/swizzy-web-service-cli/commands/request-service";
|
|
35
|
+
import { detectProject } from "@swizzyai/swizzy-web-service-cli/scaffolding/project-detector";
|
|
36
|
+
const server = new Server({
|
|
37
|
+
name: "swizzy-ai-skill",
|
|
38
|
+
version: "0.1.2",
|
|
39
|
+
}, {
|
|
40
|
+
capabilities: {
|
|
41
|
+
tools: {},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
45
|
+
tools: [
|
|
46
|
+
{
|
|
47
|
+
name: "create_web_service",
|
|
48
|
+
description: "Create a new Swizzy Web Service project. Use serviceArgs instead of env variables for configuration.",
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: {
|
|
52
|
+
name: { type: "string", description: "Project name (PascalCase)" },
|
|
53
|
+
cwd: { type: "string", description: "Absolute path to the directory where the project should be created (defaults to server CWD)" },
|
|
54
|
+
type: { type: "string", enum: ["backend", "frontend"], default: "backend" },
|
|
55
|
+
scope: { type: "string", description: "NPM scope" },
|
|
56
|
+
install: { type: "boolean", description: "Run npm install", default: false },
|
|
57
|
+
stateFields: {
|
|
58
|
+
type: "array",
|
|
59
|
+
items: {
|
|
60
|
+
type: "object",
|
|
61
|
+
properties: {
|
|
62
|
+
name: { type: "string" },
|
|
63
|
+
type: { type: "string" },
|
|
64
|
+
},
|
|
65
|
+
required: ["name", "type"],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
serviceArgs: {
|
|
69
|
+
type: "array",
|
|
70
|
+
items: {
|
|
71
|
+
type: "object",
|
|
72
|
+
properties: {
|
|
73
|
+
name: { type: "string" },
|
|
74
|
+
type: { type: "string" },
|
|
75
|
+
},
|
|
76
|
+
required: ["name", "type"],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
required: ["name"],
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "create_router",
|
|
85
|
+
description: "Add a new Swizzy Router to the current project. Use serviceArgs for typed configuration parameters.",
|
|
86
|
+
inputSchema: {
|
|
87
|
+
type: "object",
|
|
88
|
+
properties: {
|
|
89
|
+
name: { type: "string", description: "Router name (PascalCase)" },
|
|
90
|
+
path: { type: "string", description: "URL path segment" },
|
|
91
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
92
|
+
standardMiddleware: { type: "boolean", default: true },
|
|
93
|
+
stateFields: {
|
|
94
|
+
type: "array",
|
|
95
|
+
items: {
|
|
96
|
+
type: "object",
|
|
97
|
+
properties: {
|
|
98
|
+
name: { type: "string" },
|
|
99
|
+
type: { type: "string" },
|
|
100
|
+
},
|
|
101
|
+
required: ["name", "type"],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
serviceArgs: {
|
|
105
|
+
type: "array",
|
|
106
|
+
items: {
|
|
107
|
+
type: "object",
|
|
108
|
+
properties: {
|
|
109
|
+
name: { type: "string" },
|
|
110
|
+
type: { type: "string" },
|
|
111
|
+
},
|
|
112
|
+
required: ["name", "type"],
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
required: ["name", "path"],
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "create_controller",
|
|
121
|
+
description: "Add a new Swizzy Controller to the current project. Use serviceArgs for external configuration and bodyFields/queryParams for request schema.",
|
|
122
|
+
inputSchema: {
|
|
123
|
+
type: "object",
|
|
124
|
+
properties: {
|
|
125
|
+
name: { type: "string", description: "Controller name (PascalCase)" },
|
|
126
|
+
action: { type: "string", description: "Action name/URL segment" },
|
|
127
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
128
|
+
method: { type: "string", enum: ["get", "post", "put", "delete", "patch"], default: "get" },
|
|
129
|
+
router: { type: "string", description: "Parent router name" },
|
|
130
|
+
body: { type: "boolean", default: false },
|
|
131
|
+
query: { type: "boolean", default: false },
|
|
132
|
+
bodyFields: {
|
|
133
|
+
type: "array",
|
|
134
|
+
items: {
|
|
135
|
+
type: "object",
|
|
136
|
+
properties: {
|
|
137
|
+
name: { type: "string" },
|
|
138
|
+
type: { type: "string" },
|
|
139
|
+
},
|
|
140
|
+
required: ["name", "type"],
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
queryParams: {
|
|
144
|
+
type: "array",
|
|
145
|
+
items: {
|
|
146
|
+
type: "object",
|
|
147
|
+
properties: {
|
|
148
|
+
name: { type: "string" },
|
|
149
|
+
type: { type: "string" },
|
|
150
|
+
},
|
|
151
|
+
required: ["name", "type"],
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
stateFields: {
|
|
155
|
+
type: "array",
|
|
156
|
+
items: {
|
|
157
|
+
type: "object",
|
|
158
|
+
properties: {
|
|
159
|
+
name: { type: "string" },
|
|
160
|
+
type: { type: "string" },
|
|
161
|
+
},
|
|
162
|
+
required: ["name", "type"],
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
serviceArgs: {
|
|
166
|
+
type: "array",
|
|
167
|
+
items: {
|
|
168
|
+
type: "object",
|
|
169
|
+
properties: {
|
|
170
|
+
name: { type: "string" },
|
|
171
|
+
type: { type: "string" },
|
|
172
|
+
},
|
|
173
|
+
required: ["name", "type"],
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
required: ["name", "action", "router"],
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: "create_middleware",
|
|
182
|
+
description: "Add a new Swizzy Middleware to the current project",
|
|
183
|
+
inputSchema: {
|
|
184
|
+
type: "object",
|
|
185
|
+
properties: {
|
|
186
|
+
name: { type: "string", description: "Middleware name (PascalCase)" },
|
|
187
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
188
|
+
router: { type: "string", description: "Parent router name" },
|
|
189
|
+
controller: { type: "string", description: "Optional parent controller name" },
|
|
190
|
+
},
|
|
191
|
+
required: ["name", "router"],
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: "delete_middleware",
|
|
196
|
+
description: "Delete a middleware from the project",
|
|
197
|
+
inputSchema: {
|
|
198
|
+
type: "object",
|
|
199
|
+
properties: {
|
|
200
|
+
name: { type: "string", description: "Middleware name (PascalCase)" },
|
|
201
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
202
|
+
router: { type: "string", description: "Parent router name" },
|
|
203
|
+
controller: { type: "string", description: "Optional parent controller name" },
|
|
204
|
+
},
|
|
205
|
+
required: ["name", "router"],
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: "rename_middleware",
|
|
210
|
+
description: "Rename a middleware in the project",
|
|
211
|
+
inputSchema: {
|
|
212
|
+
type: "object",
|
|
213
|
+
properties: {
|
|
214
|
+
oldName: { type: "string", description: "Current middleware name" },
|
|
215
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
216
|
+
newName: { type: "string", description: "New middleware name" },
|
|
217
|
+
router: { type: "string", description: "Parent router name" },
|
|
218
|
+
controller: { type: "string", description: "Optional parent controller name" },
|
|
219
|
+
},
|
|
220
|
+
required: ["oldName", "newName", "router"],
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: "build_service",
|
|
225
|
+
description: "Build the current Swizzy Web Service",
|
|
226
|
+
inputSchema: {
|
|
227
|
+
type: "object",
|
|
228
|
+
properties: {
|
|
229
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
name: "get_project_structure",
|
|
235
|
+
description: "Get the structure of the current Swizzy project, including routers, controllers, and middleware.",
|
|
236
|
+
inputSchema: {
|
|
237
|
+
type: "object",
|
|
238
|
+
properties: {
|
|
239
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: "delete_controller",
|
|
245
|
+
description: "Delete a controller from the project",
|
|
246
|
+
inputSchema: {
|
|
247
|
+
type: "object",
|
|
248
|
+
properties: {
|
|
249
|
+
name: { type: "string", description: "Controller name (PascalCase)" },
|
|
250
|
+
router: { type: "string", description: "Parent router name" },
|
|
251
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
252
|
+
},
|
|
253
|
+
required: ["name", "router"],
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: "delete_router",
|
|
258
|
+
description: "Delete a router from the project",
|
|
259
|
+
inputSchema: {
|
|
260
|
+
type: "object",
|
|
261
|
+
properties: {
|
|
262
|
+
name: { type: "string", description: "Router name (PascalCase)" },
|
|
263
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
264
|
+
},
|
|
265
|
+
required: ["name"],
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
name: "rename_controller",
|
|
270
|
+
description: "Rename a controller in the project",
|
|
271
|
+
inputSchema: {
|
|
272
|
+
type: "object",
|
|
273
|
+
properties: {
|
|
274
|
+
oldName: { type: "string", description: "Current controller name" },
|
|
275
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
276
|
+
newName: { type: "string", description: "New controller name" },
|
|
277
|
+
router: { type: "string", description: "Parent router name" },
|
|
278
|
+
},
|
|
279
|
+
required: ["oldName", "newName", "router"],
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
name: "rename_router",
|
|
284
|
+
description: "Rename a router in the project",
|
|
285
|
+
inputSchema: {
|
|
286
|
+
type: "object",
|
|
287
|
+
properties: {
|
|
288
|
+
oldName: { type: "string", description: "Current router name" },
|
|
289
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
290
|
+
newName: { type: "string", description: "New router name" },
|
|
291
|
+
},
|
|
292
|
+
required: ["oldName", "newName"],
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: "run_service",
|
|
297
|
+
description: "Start the Swizzy Web Service. Returns the process PID. The service runs in the background.",
|
|
298
|
+
inputSchema: {
|
|
299
|
+
type: "object",
|
|
300
|
+
properties: {
|
|
301
|
+
port: { type: "number", description: "Port to bind (defaults to service default)" },
|
|
302
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
name: "dev_service",
|
|
308
|
+
description: "Start the Swizzy Web Service in dev mode with TypeScript watch and auto-restart. Returns the process PID.",
|
|
309
|
+
inputSchema: {
|
|
310
|
+
type: "object",
|
|
311
|
+
properties: {
|
|
312
|
+
port: { type: "number", description: "Port to bind (defaults to service default)" },
|
|
313
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
name: "generate_tests",
|
|
319
|
+
description: "Generate test stubs for all routers and controllers in the current project.",
|
|
320
|
+
inputSchema: {
|
|
321
|
+
type: "object",
|
|
322
|
+
properties: {
|
|
323
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
name: "generate_spec",
|
|
329
|
+
description: "Export an OpenAPI 3.0 spec from the current project.",
|
|
330
|
+
inputSchema: {
|
|
331
|
+
type: "object",
|
|
332
|
+
properties: {
|
|
333
|
+
cwd: { type: "string", description: "Absolute path to the project directory" },
|
|
334
|
+
output: { type: "string", description: "Output file path (default: openapi.yaml or openapi.json)" },
|
|
335
|
+
basePath: { type: "string", description: "Override API base path" },
|
|
336
|
+
serverUrl: { type: "string", description: "Embed server URL in spec" },
|
|
337
|
+
version: { type: "string", description: "API version (default: 1.0.0)" },
|
|
338
|
+
json: { type: "boolean", description: "Output JSON instead of YAML", default: false },
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
name: "generate_skeleton",
|
|
344
|
+
description: "Scaffold a new Swizzy project from an OpenAPI 3.0 spec file.",
|
|
345
|
+
inputSchema: {
|
|
346
|
+
type: "object",
|
|
347
|
+
properties: {
|
|
348
|
+
spec: { type: "string", description: "Path to OpenAPI 3.0 spec file (JSON or YAML)" },
|
|
349
|
+
output: { type: "string", description: "Output directory (default: ./generated)" },
|
|
350
|
+
name: { type: "string", description: "Service name override" },
|
|
351
|
+
scope: { type: "string", description: "NPM scope" },
|
|
352
|
+
basePath: { type: "string", description: "API base path (default: api)" },
|
|
353
|
+
},
|
|
354
|
+
required: ["spec"],
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
name: "request",
|
|
359
|
+
description: "Send an HTTP request to a running Swizzy service. Omit endpoint to list available endpoints.",
|
|
360
|
+
inputSchema: {
|
|
361
|
+
type: "object",
|
|
362
|
+
properties: {
|
|
363
|
+
baseUrl: { type: "string", description: "Base URL of the service (default: http://localhost:3000)" },
|
|
364
|
+
endpoint: { type: "string", description: "Endpoint label (e.g. 'GET /api/users/list'). Omit to list all." },
|
|
365
|
+
body: { type: "string", description: "JSON request body" },
|
|
366
|
+
query: { type: "string", description: "JSON query params" },
|
|
367
|
+
},
|
|
368
|
+
},
|
|
369
|
+
},
|
|
370
|
+
],
|
|
371
|
+
}));
|
|
372
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
373
|
+
const { name, arguments: args } = request.params;
|
|
374
|
+
const cwd = args?.cwd ?? process.cwd();
|
|
375
|
+
try {
|
|
376
|
+
switch (name) {
|
|
377
|
+
case "create_web_service": {
|
|
378
|
+
const result = await createWebService({
|
|
379
|
+
name: args?.name,
|
|
380
|
+
type: args?.type ?? "backend",
|
|
381
|
+
scope: args?.scope,
|
|
382
|
+
install: args?.install,
|
|
383
|
+
stateFields: args?.stateFields,
|
|
384
|
+
serviceArgs: args?.serviceArgs,
|
|
385
|
+
cwd: cwd,
|
|
386
|
+
stdio: ["ignore", "pipe", "inherit"],
|
|
387
|
+
});
|
|
388
|
+
return {
|
|
389
|
+
content: [{ type: "text", text: `Successfully created project: ${result.packageName} at ${result.projectDir}` }],
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
case "create_router": {
|
|
393
|
+
const result = await createRouter({
|
|
394
|
+
name: args?.name,
|
|
395
|
+
routerPath: args?.path,
|
|
396
|
+
includeStandardMiddleware: args?.standardMiddleware ?? true,
|
|
397
|
+
stateFields: args?.stateFields,
|
|
398
|
+
serviceArgs: args?.serviceArgs,
|
|
399
|
+
cwd: cwd,
|
|
400
|
+
});
|
|
401
|
+
return {
|
|
402
|
+
content: [{ type: "text", text: `Successfully created router: ${result.routerFilePath}. Patched: ${result.patchedFiles.join(", ")}` }],
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
case "create_controller": {
|
|
406
|
+
const result = await createController({
|
|
407
|
+
name: args?.name,
|
|
408
|
+
action: args?.action,
|
|
409
|
+
method: (args?.method ?? "get"),
|
|
410
|
+
routerName: args?.router,
|
|
411
|
+
hasBody: args?.body,
|
|
412
|
+
hasQuery: args?.query,
|
|
413
|
+
bodyFields: args?.bodyFields,
|
|
414
|
+
queryParams: args?.queryParams,
|
|
415
|
+
stateFields: args?.stateFields,
|
|
416
|
+
serviceArgs: args?.serviceArgs,
|
|
417
|
+
cwd: cwd,
|
|
418
|
+
});
|
|
419
|
+
return {
|
|
420
|
+
content: [{ type: "text", text: `Successfully created controller: ${result.controllerFilePath}. Test: ${result.testFilePath}. Patched: ${result.patchedFiles.join(", ")}` }],
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
case "create_middleware": {
|
|
424
|
+
const result = await createMiddleware({
|
|
425
|
+
name: args?.name,
|
|
426
|
+
routerName: args?.router,
|
|
427
|
+
controllerName: args?.controller,
|
|
428
|
+
cwd: cwd,
|
|
429
|
+
});
|
|
430
|
+
return {
|
|
431
|
+
content: [{ type: "text", text: `Successfully created middleware: ${result.middlewareFilePath}. Patched: ${result.patchedFiles.join(", ")}` }],
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
case "delete_middleware": {
|
|
435
|
+
await deleteMiddleware({
|
|
436
|
+
name: args?.name,
|
|
437
|
+
routerName: args?.router,
|
|
438
|
+
controllerName: args?.controller,
|
|
439
|
+
cwd,
|
|
440
|
+
});
|
|
441
|
+
return {
|
|
442
|
+
content: [{ type: "text", text: `Successfully deleted middleware ${args?.name} from ${args?.controller ? `controller ${args?.controller}` : `router ${args?.router}`}` }],
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
case "rename_middleware": {
|
|
446
|
+
await renameMiddleware({
|
|
447
|
+
oldName: args?.oldName,
|
|
448
|
+
newName: args?.newName,
|
|
449
|
+
routerName: args?.router,
|
|
450
|
+
controllerName: args?.controller,
|
|
451
|
+
cwd,
|
|
452
|
+
});
|
|
453
|
+
return {
|
|
454
|
+
content: [{ type: "text", text: `Successfully renamed middleware ${args?.oldName} to ${args?.newName} in ${args?.controller ? `controller ${args?.controller}` : `router ${args?.router}`}` }],
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
case "build_service": {
|
|
458
|
+
const buildResult = spawnSync("npm", ["run", "build"], { cwd, stdio: ["ignore", "pipe", "pipe"] });
|
|
459
|
+
const buildOutput = [buildResult.stdout?.toString(), buildResult.stderr?.toString()].filter(Boolean).join("\n").trim();
|
|
460
|
+
if (buildResult.status !== 0) {
|
|
461
|
+
throw new Error(`Build failed:\n${buildOutput}`);
|
|
462
|
+
}
|
|
463
|
+
return {
|
|
464
|
+
content: [{ type: "text", text: buildOutput ? `Build output:\n${buildOutput}` : "Successfully built the service." }],
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
case "get_project_structure": {
|
|
468
|
+
const project = detectProject(cwd);
|
|
469
|
+
return {
|
|
470
|
+
content: [{ type: "text", text: JSON.stringify(project, null, 2) }],
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
case "delete_controller": {
|
|
474
|
+
await deleteController({
|
|
475
|
+
name: args?.name,
|
|
476
|
+
routerName: args?.router,
|
|
477
|
+
cwd: cwd,
|
|
478
|
+
});
|
|
479
|
+
return {
|
|
480
|
+
content: [{ type: "text", text: `Successfully deleted controller ${args?.name} from router ${args?.router}` }],
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
case "delete_router": {
|
|
484
|
+
await deleteRouter({
|
|
485
|
+
name: args?.name,
|
|
486
|
+
cwd: cwd,
|
|
487
|
+
});
|
|
488
|
+
return {
|
|
489
|
+
content: [{ type: "text", text: `Successfully deleted router ${args?.name}` }],
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
case "rename_controller": {
|
|
493
|
+
await renameController({
|
|
494
|
+
oldName: args?.oldName,
|
|
495
|
+
newName: args?.newName,
|
|
496
|
+
routerName: args?.router,
|
|
497
|
+
cwd: cwd,
|
|
498
|
+
});
|
|
499
|
+
return {
|
|
500
|
+
content: [{ type: "text", text: `Successfully renamed controller ${args?.oldName} to ${args?.newName} in router ${args?.router}` }],
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
case "rename_router": {
|
|
504
|
+
await renameRouter({
|
|
505
|
+
oldName: args?.oldName,
|
|
506
|
+
newName: args?.newName,
|
|
507
|
+
cwd: cwd,
|
|
508
|
+
});
|
|
509
|
+
return {
|
|
510
|
+
content: [{ type: "text", text: `Successfully renamed router ${args?.oldName} to ${args?.newName}` }],
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
case "run_service": {
|
|
514
|
+
const child = runService({ cwd: cwd, port: args?.port });
|
|
515
|
+
return {
|
|
516
|
+
content: [{ type: "text", text: `Service started (PID ${child.pid}). Running in background.` }],
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
case "dev_service": {
|
|
520
|
+
const cleanup = startDevServer({ cwd: cwd, port: args?.port });
|
|
521
|
+
return {
|
|
522
|
+
content: [{ type: "text", text: `Dev server started in background (tsc --watch + swerve). Call cleanup to stop.` }],
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
case "generate_tests": {
|
|
526
|
+
const result = generateTests({ cwd: cwd });
|
|
527
|
+
const lines = [
|
|
528
|
+
`Helper: ${result.helperFile}${result.helperSkipped ? " (skipped, already exists)" : ""}`,
|
|
529
|
+
`Created: ${result.created.length ? result.created.join(", ") : "none"}`,
|
|
530
|
+
`Skipped: ${result.skipped.length ? result.skipped.join(", ") : "none"}`,
|
|
531
|
+
];
|
|
532
|
+
return {
|
|
533
|
+
content: [{ type: "text", text: lines.join("\n") }],
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
case "generate_spec": {
|
|
537
|
+
const result = generateSpec({
|
|
538
|
+
projectDir: cwd,
|
|
539
|
+
output: args?.output,
|
|
540
|
+
basePath: args?.basePath,
|
|
541
|
+
serverUrl: args?.serverUrl,
|
|
542
|
+
version: args?.version,
|
|
543
|
+
json: args?.json,
|
|
544
|
+
});
|
|
545
|
+
return {
|
|
546
|
+
content: [{ type: "text", text: `Spec written to ${result.outputFile} (${result.routerCount} routers, ${result.operationCount} operations)` }],
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
case "generate_skeleton": {
|
|
550
|
+
const result = generateSkeleton({
|
|
551
|
+
spec: args?.spec,
|
|
552
|
+
output: args?.output,
|
|
553
|
+
name: args?.name,
|
|
554
|
+
scope: args?.scope,
|
|
555
|
+
basePath: args?.basePath,
|
|
556
|
+
});
|
|
557
|
+
return {
|
|
558
|
+
content: [{ type: "text", text: `Skeleton generated at ${result.outputDir} (service: ${result.serviceName}, ${result.routerCount} routers, ${result.controllerCount} controllers)\nCreated: ${result.created.join(", ")}` }],
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
case "request": {
|
|
562
|
+
const baseUrl = args?.baseUrl ?? "http://localhost:3000";
|
|
563
|
+
const endpoints = buildEndpoints(cwd);
|
|
564
|
+
if (!args?.endpoint) {
|
|
565
|
+
const list = endpoints.map((e) => e.label).join("\n");
|
|
566
|
+
return {
|
|
567
|
+
content: [{ type: "text", text: `Available endpoints:\n${list}` }],
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
const endpoint = endpoints.find((e) => e.label === args.endpoint);
|
|
571
|
+
if (!endpoint) {
|
|
572
|
+
return {
|
|
573
|
+
content: [{ type: "text", text: `Endpoint not found: "${args.endpoint}". Available:\n${endpoints.map((e) => e.label).join("\n")}` }],
|
|
574
|
+
isError: true,
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
const body = args?.body ? JSON.parse(args.body) : undefined;
|
|
578
|
+
const query = args?.query ? JSON.parse(args.query) : undefined;
|
|
579
|
+
const result = await sendRequest({ baseUrl, endpoint, body, query });
|
|
580
|
+
return {
|
|
581
|
+
content: [{ type: "text", text: `${result.status} ${result.statusText} (${result.durationMs}ms)\n${result.body}` }],
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
default:
|
|
585
|
+
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
catch (error) {
|
|
589
|
+
return {
|
|
590
|
+
content: [{ type: "text", text: `Error: ${error.message}` }],
|
|
591
|
+
isError: true,
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
});
|
|
595
|
+
async function main() {
|
|
596
|
+
const transport = new StdioServerTransport();
|
|
597
|
+
await server.connect(transport);
|
|
598
|
+
console.error("Swizzy AI Tool MCP server running on stdio");
|
|
599
|
+
}
|
|
600
|
+
main().catch((error) => {
|
|
601
|
+
console.error("Server error:", error);
|
|
602
|
+
process.exit(1);
|
|
603
|
+
});
|
|
604
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,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AAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;AAC9D,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@swizzyai/swizzy-ai-skill",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "AI Agent tool for working with swizzy web ecosystem.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"AI",
|
|
7
|
+
"SwizzyAI",
|
|
8
|
+
"tool"
|
|
9
|
+
],
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"author": "Jason Gallagher",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/SwizzyAI/swizzy-ai-skill.git"
|
|
15
|
+
},
|
|
16
|
+
"bin": {
|
|
17
|
+
"swizzy-ai-skill": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/index.js",
|
|
21
|
+
"dist/index.js.map"
|
|
22
|
+
],
|
|
23
|
+
"type": "module",
|
|
24
|
+
"main": "dist/index.js",
|
|
25
|
+
"scripts": {
|
|
26
|
+
"tsc": "tsc",
|
|
27
|
+
"build": "tsc",
|
|
28
|
+
"test": "tsc -p tsconfig.test.json && node --test ./dist/test/**/*.spec.js",
|
|
29
|
+
"prepublishOnly": "npm test"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@modelcontextprotocol/sdk": "^1.6.0",
|
|
33
|
+
"@swizzyai/swizzy-web-service-cli": "^0.1.12"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "^22.0.0",
|
|
37
|
+
"typescript": "^5.8.3"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=18.0.0"
|
|
41
|
+
}
|
|
42
|
+
}
|