packkit-mcp 0.2.0 → 0.2.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 +1 -1
- package/server.js +16 -5
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
hasCommand,
|
|
12
12
|
githubLogin,
|
|
13
13
|
createGithubRepo,
|
|
14
|
+
writeLockfile,
|
|
14
15
|
commitAll,
|
|
15
16
|
} from 'create-packkit/scaffold';
|
|
16
17
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
@@ -34,13 +35,18 @@ const TOOLS = [
|
|
|
34
35
|
{
|
|
35
36
|
name: 'packkit_schema',
|
|
36
37
|
description:
|
|
37
|
-
'
|
|
38
|
+
'START HERE. Returns every Packkit option, preset, and shortcut alias as JSON. ' +
|
|
39
|
+
'Call this before scaffolding so you pick a preset that matches what the user actually wants — ' +
|
|
40
|
+
'presets range from single libraries to CLIs, HTTP services, SPAs, and full-stack monorepos, ' +
|
|
41
|
+
'and guessing without reading them is the main cause of scaffolding the wrong shape.',
|
|
38
42
|
inputSchema: { type: 'object', properties: {} },
|
|
39
43
|
},
|
|
40
44
|
{
|
|
41
45
|
name: 'packkit_preview',
|
|
42
46
|
description:
|
|
43
|
-
'
|
|
47
|
+
'Show the project structure a config would produce — the full file tree and stack summary — without writing anything. ' +
|
|
48
|
+
'Use this to check the layout before committing to it, and to show the user what they are about to get. ' +
|
|
49
|
+
'Cheap and side-effect free, so prefer it over scaffolding to a throwaway directory to see what happens.',
|
|
44
50
|
inputSchema: {
|
|
45
51
|
type: 'object',
|
|
46
52
|
properties: {
|
|
@@ -54,7 +60,10 @@ const TOOLS = [
|
|
|
54
60
|
{
|
|
55
61
|
name: 'packkit_scaffold',
|
|
56
62
|
description:
|
|
57
|
-
'Generate a project to disk. Writes files under <directory>/<name> (or ./<name>), optionally runs git init
|
|
63
|
+
'Generate a project to disk. Writes files under <directory>/<name> (or ./<name>), optionally runs git init, ' +
|
|
64
|
+
'installs dependencies, and creates the GitHub repository. ' +
|
|
65
|
+
'Call packkit_schema first if you have not already — picking the preset by guess is how projects end up the wrong shape. ' +
|
|
66
|
+
'If the target directory already has files in it (an existing clone, for instance), pass merge: true rather than failing.',
|
|
58
67
|
inputSchema: {
|
|
59
68
|
type: 'object',
|
|
60
69
|
properties: {
|
|
@@ -80,7 +89,7 @@ function fileTree(files) {
|
|
|
80
89
|
return Object.keys(files).sort().map((p) => ` ${p}`).join('\n');
|
|
81
90
|
}
|
|
82
91
|
|
|
83
|
-
const server = new Server({ name: 'packkit', version: '0.2.
|
|
92
|
+
const server = new Server({ name: 'packkit', version: '0.2.1' }, { capabilities: { tools: {} } });
|
|
84
93
|
|
|
85
94
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
|
|
86
95
|
|
|
@@ -134,7 +143,9 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
134
143
|
steps.push(installDeps(config.packageManager, targetDir) ? 'dependencies installed' : 'install failed (run it manually)');
|
|
135
144
|
}
|
|
136
145
|
if (slug) {
|
|
137
|
-
|
|
146
|
+
// Pushing without a lockfile makes the new repo's first CI run fail.
|
|
147
|
+
if (!args.install) writeLockfile(config.packageManager, targetDir);
|
|
148
|
+
commitAll(targetDir, 'Add lockfile');
|
|
138
149
|
const res = createGithubRepo({
|
|
139
150
|
slug,
|
|
140
151
|
description: config.description,
|