ios-vibe-mcp01 0.1.6 → 0.1.8
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/README.md +1 -1
- package/dist/index.js +4 -10
- package/dist/iosVibe.js +87 -71
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
-
import {
|
|
4
|
+
import { registerIosVibeTools } from "./iosVibe.js";
|
|
5
5
|
async function main() {
|
|
6
|
-
const server = new McpServer({
|
|
7
|
-
|
|
8
|
-
version: "0.1.2",
|
|
9
|
-
});
|
|
10
|
-
// ✅ ios_vibe tool'unu ekle
|
|
11
|
-
registerIosVibeTool(server);
|
|
12
|
-
// ✅ Cursor MCP: stdio transport ile bağlan
|
|
6
|
+
const server = new McpServer({ name: "ios-vibe-factory", version: "0.1.5" });
|
|
7
|
+
registerIosVibeTools(server);
|
|
13
8
|
const transport = new StdioServerTransport();
|
|
14
9
|
await server.connect(transport);
|
|
15
|
-
// ⚠️ stdout'a log basma (protocol bozulur). Sadece stderr.
|
|
16
10
|
console.error("ios-vibe-mcp01: connected via stdio");
|
|
17
11
|
}
|
|
18
12
|
main().catch((err) => {
|
|
19
|
-
console.error("
|
|
13
|
+
console.error("startup failed", err);
|
|
20
14
|
process.exit(1);
|
|
21
15
|
});
|
package/dist/iosVibe.js
CHANGED
|
@@ -1,76 +1,92 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { renderFilesForCommand } from "./templates.js";
|
|
3
3
|
import { validateWorkflow } from "./rules.js";
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.
|
|
31
|
-
.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
4
|
+
const ConfigSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
appName: z.string().default("MyApp"),
|
|
7
|
+
iosMin: z.string().default("17.0"),
|
|
8
|
+
storage: z.enum(["coredata", "swiftdata"]).default("coredata"),
|
|
9
|
+
tone: z.string().default("soft pink"),
|
|
10
|
+
constraints: z.array(z.string()).default(["offline-first", "no firebase", "mvvm", "repository"]),
|
|
11
|
+
})
|
|
12
|
+
.optional();
|
|
13
|
+
const StateSchema = z
|
|
14
|
+
.object({
|
|
15
|
+
projectBlueprintMd: z.string().optional(),
|
|
16
|
+
todoMd: z.string().optional(),
|
|
17
|
+
stageArchitectureMd: z.string().optional(),
|
|
18
|
+
stageCodingMd: z.string().optional(),
|
|
19
|
+
stageUiuxMd: z.string().optional(),
|
|
20
|
+
stageTestMd: z.string().optional(),
|
|
21
|
+
iosRulesMd: z.string().optional(),
|
|
22
|
+
runbookMd: z.string().optional(),
|
|
23
|
+
backlogMd: z.string().optional(),
|
|
24
|
+
})
|
|
25
|
+
.optional();
|
|
26
|
+
function run(command, raw) {
|
|
27
|
+
const r = (raw ?? {});
|
|
28
|
+
const input = {
|
|
29
|
+
command,
|
|
30
|
+
idea: r.idea,
|
|
31
|
+
config: r.config,
|
|
32
|
+
state: r.state,
|
|
33
|
+
};
|
|
34
|
+
const flow = validateWorkflow(input);
|
|
35
|
+
if (!flow.ok) {
|
|
36
|
+
return {
|
|
37
|
+
content: [
|
|
38
|
+
{
|
|
39
|
+
type: "text",
|
|
40
|
+
text: `Command blocked: ${flow.reason}\n\nFix: ${flow.fix}\n\nSuggested next: ${flow.suggestedNext}`,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const result = renderFilesForCommand(input);
|
|
46
|
+
return {
|
|
47
|
+
content: [
|
|
48
|
+
{
|
|
49
|
+
type: "text",
|
|
50
|
+
text: JSON.stringify(result, null, 2),
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
};
|
|
52
54
|
}
|
|
53
|
-
export function
|
|
54
|
-
// ✅
|
|
55
|
-
server.tool("
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
55
|
+
export function registerIosVibeTools(server) {
|
|
56
|
+
// ✅ PLAN (idea required)
|
|
57
|
+
server.tool("ios_plan", {
|
|
58
|
+
idea: z.string().describe("Your app idea (required)"),
|
|
59
|
+
config: ConfigSchema.describe("Optional project configuration").optional(),
|
|
60
|
+
state: StateSchema.describe("Previous stage outputs (auto-managed)").optional(),
|
|
61
|
+
}, async (args) => run("plan", args));
|
|
62
|
+
// ✅ architecture
|
|
63
|
+
server.tool("ios_architecture", {
|
|
64
|
+
config: ConfigSchema.describe("Optional project configuration").optional(),
|
|
65
|
+
state: StateSchema.describe("Previous stage outputs (auto-managed)").optional(),
|
|
66
|
+
}, async (args) => run("architecture", args));
|
|
67
|
+
// ✅ coding
|
|
68
|
+
server.tool("ios_coding", {
|
|
69
|
+
config: ConfigSchema.describe("Optional project configuration").optional(),
|
|
70
|
+
state: StateSchema.describe("Previous stage outputs (auto-managed)").optional(),
|
|
71
|
+
}, async (args) => run("coding", args));
|
|
72
|
+
// ✅ uiux
|
|
73
|
+
server.tool("ios_uiux", {
|
|
74
|
+
config: ConfigSchema.describe("Optional project configuration").optional(),
|
|
75
|
+
state: StateSchema.describe("Previous stage outputs (auto-managed)").optional(),
|
|
76
|
+
}, async (args) => run("uiux", args));
|
|
77
|
+
// ✅ test
|
|
78
|
+
server.tool("ios_test", {
|
|
79
|
+
config: ConfigSchema.describe("Optional project configuration").optional(),
|
|
80
|
+
state: StateSchema.describe("Previous stage outputs (auto-managed)").optional(),
|
|
81
|
+
}, async (args) => run("test", args));
|
|
82
|
+
// ✅ review
|
|
83
|
+
server.tool("ios_review", {
|
|
84
|
+
config: ConfigSchema.describe("Optional project configuration").optional(),
|
|
85
|
+
state: StateSchema.describe("Previous stage outputs (auto-managed)").optional(),
|
|
86
|
+
}, async (args) => run("review", args));
|
|
87
|
+
// ✅ ship
|
|
88
|
+
server.tool("ios_ship", {
|
|
89
|
+
config: ConfigSchema.describe("Optional project configuration").optional(),
|
|
90
|
+
state: StateSchema.describe("Previous stage outputs (auto-managed)").optional(),
|
|
91
|
+
}, async (args) => run("ship", args));
|
|
76
92
|
}
|
package/package.json
CHANGED