codecartographer-pi 0.14.0 → 0.14.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.
|
@@ -4,79 +4,95 @@ export declare function handleInit(args: {
|
|
|
4
4
|
pipeline?: string;
|
|
5
5
|
force?: boolean;
|
|
6
6
|
}): Promise<{
|
|
7
|
-
content:
|
|
7
|
+
content: {
|
|
8
8
|
type: "text";
|
|
9
9
|
text: string;
|
|
10
|
-
}
|
|
11
|
-
structuredContent
|
|
10
|
+
}[];
|
|
11
|
+
structuredContent: {
|
|
12
|
+
text: string;
|
|
13
|
+
};
|
|
12
14
|
}>;
|
|
13
15
|
export declare function handleStatus(args: {
|
|
14
16
|
cwd: string;
|
|
15
17
|
}): Promise<{
|
|
16
|
-
content:
|
|
18
|
+
content: {
|
|
17
19
|
type: "text";
|
|
18
20
|
text: string;
|
|
19
|
-
}
|
|
20
|
-
structuredContent
|
|
21
|
+
}[];
|
|
22
|
+
structuredContent: {
|
|
23
|
+
text: string;
|
|
24
|
+
};
|
|
21
25
|
}>;
|
|
22
26
|
export declare function handleSwitchPipeline(args: {
|
|
23
27
|
cwd: string;
|
|
24
28
|
pipeline: string;
|
|
25
29
|
}): Promise<{
|
|
26
|
-
content:
|
|
30
|
+
content: {
|
|
27
31
|
type: "text";
|
|
28
32
|
text: string;
|
|
29
|
-
}
|
|
30
|
-
structuredContent
|
|
33
|
+
}[];
|
|
34
|
+
structuredContent: {
|
|
35
|
+
text: string;
|
|
36
|
+
};
|
|
31
37
|
}>;
|
|
32
38
|
export declare function handleNext(args: {
|
|
33
39
|
cwd: string;
|
|
34
40
|
}): Promise<{
|
|
35
|
-
content:
|
|
41
|
+
content: {
|
|
36
42
|
type: "text";
|
|
37
43
|
text: string;
|
|
38
|
-
}
|
|
39
|
-
structuredContent
|
|
44
|
+
}[];
|
|
45
|
+
structuredContent: {
|
|
46
|
+
text: string;
|
|
47
|
+
};
|
|
40
48
|
}>;
|
|
41
49
|
export declare function handlePhase(args: {
|
|
42
50
|
cwd: string;
|
|
43
51
|
phase: string;
|
|
44
52
|
}): Promise<{
|
|
45
|
-
content:
|
|
53
|
+
content: {
|
|
46
54
|
type: "text";
|
|
47
55
|
text: string;
|
|
48
|
-
}
|
|
49
|
-
structuredContent
|
|
56
|
+
}[];
|
|
57
|
+
structuredContent: {
|
|
58
|
+
text: string;
|
|
59
|
+
};
|
|
50
60
|
}>;
|
|
51
61
|
export declare function handleValidate(args: {
|
|
52
62
|
cwd: string;
|
|
53
63
|
phase?: string;
|
|
54
64
|
}): Promise<{
|
|
55
|
-
content:
|
|
65
|
+
content: {
|
|
56
66
|
type: "text";
|
|
57
67
|
text: string;
|
|
58
|
-
}
|
|
59
|
-
structuredContent
|
|
68
|
+
}[];
|
|
69
|
+
structuredContent: {
|
|
70
|
+
text: string;
|
|
71
|
+
};
|
|
60
72
|
}>;
|
|
61
73
|
export declare function handleComplete(args: {
|
|
62
74
|
cwd: string;
|
|
63
75
|
phase?: string;
|
|
64
76
|
}): Promise<{
|
|
65
|
-
content:
|
|
77
|
+
content: {
|
|
66
78
|
type: "text";
|
|
67
79
|
text: string;
|
|
68
|
-
}
|
|
69
|
-
structuredContent
|
|
80
|
+
}[];
|
|
81
|
+
structuredContent: {
|
|
82
|
+
text: string;
|
|
83
|
+
};
|
|
70
84
|
}>;
|
|
71
85
|
export declare function handleSkill(args: {
|
|
72
86
|
cwd: string;
|
|
73
87
|
name: string;
|
|
74
88
|
}): Promise<{
|
|
75
|
-
content:
|
|
89
|
+
content: {
|
|
76
90
|
type: "text";
|
|
77
91
|
text: string;
|
|
78
|
-
}
|
|
79
|
-
structuredContent
|
|
92
|
+
}[];
|
|
93
|
+
structuredContent: {
|
|
94
|
+
text: string;
|
|
95
|
+
};
|
|
80
96
|
}>;
|
|
81
97
|
export declare function readSpecArg(args: {
|
|
82
98
|
spec?: unknown;
|
|
@@ -84,25 +100,31 @@ export declare function readSpecArg(args: {
|
|
|
84
100
|
cwd?: unknown;
|
|
85
101
|
}, allowedRoots: string[]): Promise<string>;
|
|
86
102
|
export declare function handlePublish(args: Record<string, unknown>): Promise<{
|
|
87
|
-
content:
|
|
103
|
+
content: {
|
|
88
104
|
type: "text";
|
|
89
105
|
text: string;
|
|
90
|
-
}
|
|
91
|
-
structuredContent
|
|
106
|
+
}[];
|
|
107
|
+
structuredContent: {
|
|
108
|
+
text: string;
|
|
109
|
+
};
|
|
92
110
|
}>;
|
|
93
111
|
export declare function handleLibraryList(args: Record<string, unknown>): Promise<{
|
|
94
|
-
content:
|
|
112
|
+
content: {
|
|
95
113
|
type: "text";
|
|
96
114
|
text: string;
|
|
97
|
-
}
|
|
98
|
-
structuredContent
|
|
115
|
+
}[];
|
|
116
|
+
structuredContent: {
|
|
117
|
+
text: string;
|
|
118
|
+
};
|
|
99
119
|
}>;
|
|
100
120
|
export declare function handleLibraryReindex(args: Record<string, unknown>): Promise<{
|
|
101
|
-
content:
|
|
121
|
+
content: {
|
|
102
122
|
type: "text";
|
|
103
123
|
text: string;
|
|
104
|
-
}
|
|
105
|
-
structuredContent
|
|
124
|
+
}[];
|
|
125
|
+
structuredContent: {
|
|
126
|
+
text: string;
|
|
127
|
+
};
|
|
106
128
|
}>;
|
|
107
129
|
export declare function handleLibraryInit(args: {
|
|
108
130
|
library_path: string;
|
|
@@ -110,75 +132,91 @@ export declare function handleLibraryInit(args: {
|
|
|
110
132
|
namespace?: string;
|
|
111
133
|
cwd?: string;
|
|
112
134
|
}): Promise<{
|
|
113
|
-
content:
|
|
135
|
+
content: {
|
|
114
136
|
type: "text";
|
|
115
137
|
text: string;
|
|
116
|
-
}
|
|
117
|
-
structuredContent
|
|
138
|
+
}[];
|
|
139
|
+
structuredContent: {
|
|
140
|
+
text: string;
|
|
141
|
+
};
|
|
118
142
|
}>;
|
|
119
143
|
export declare function handleVision(args: {
|
|
120
144
|
cwd: string;
|
|
121
145
|
raw_text: string;
|
|
122
146
|
}): Promise<{
|
|
123
|
-
content:
|
|
147
|
+
content: {
|
|
124
148
|
type: "text";
|
|
125
149
|
text: string;
|
|
126
|
-
}
|
|
127
|
-
structuredContent
|
|
150
|
+
}[];
|
|
151
|
+
structuredContent: {
|
|
152
|
+
text: string;
|
|
153
|
+
};
|
|
128
154
|
}>;
|
|
129
155
|
export declare function handleConfig(args: {
|
|
130
156
|
cwd?: string;
|
|
131
157
|
}): Promise<{
|
|
132
|
-
content:
|
|
158
|
+
content: {
|
|
133
159
|
type: "text";
|
|
134
160
|
text: string;
|
|
135
|
-
}
|
|
136
|
-
structuredContent
|
|
161
|
+
}[];
|
|
162
|
+
structuredContent: {
|
|
163
|
+
text: string;
|
|
164
|
+
};
|
|
137
165
|
}>;
|
|
138
166
|
export declare function handleOpen(args: {
|
|
139
167
|
cwd: string;
|
|
140
168
|
}): Promise<{
|
|
141
|
-
content:
|
|
169
|
+
content: {
|
|
142
170
|
type: "text";
|
|
143
171
|
text: string;
|
|
144
|
-
}
|
|
145
|
-
structuredContent
|
|
172
|
+
}[];
|
|
173
|
+
structuredContent: {
|
|
174
|
+
text: string;
|
|
175
|
+
};
|
|
146
176
|
}>;
|
|
147
177
|
export declare function handleUsage(args: {
|
|
148
178
|
cwd: string;
|
|
149
179
|
}): Promise<{
|
|
150
|
-
content:
|
|
180
|
+
content: {
|
|
151
181
|
type: "text";
|
|
152
182
|
text: string;
|
|
153
|
-
}
|
|
154
|
-
structuredContent
|
|
183
|
+
}[];
|
|
184
|
+
structuredContent: {
|
|
185
|
+
text: string;
|
|
186
|
+
};
|
|
155
187
|
}>;
|
|
156
188
|
export declare function handleDashboard(args: {
|
|
157
189
|
cwd: string;
|
|
158
190
|
}): Promise<{
|
|
159
|
-
content:
|
|
191
|
+
content: {
|
|
160
192
|
type: "text";
|
|
161
193
|
text: string;
|
|
162
|
-
}
|
|
163
|
-
structuredContent
|
|
194
|
+
}[];
|
|
195
|
+
structuredContent: {
|
|
196
|
+
text: string;
|
|
197
|
+
};
|
|
164
198
|
}>;
|
|
165
199
|
export declare function handleListSkills(args: {
|
|
166
200
|
cwd: string;
|
|
167
201
|
}): Promise<{
|
|
168
|
-
content:
|
|
202
|
+
content: {
|
|
169
203
|
type: "text";
|
|
170
204
|
text: string;
|
|
171
|
-
}
|
|
172
|
-
structuredContent
|
|
205
|
+
}[];
|
|
206
|
+
structuredContent: {
|
|
207
|
+
text: string;
|
|
208
|
+
};
|
|
173
209
|
}>;
|
|
174
210
|
export declare function handleGuide(args: {
|
|
175
211
|
topic?: string;
|
|
176
212
|
}): Promise<{
|
|
177
|
-
content:
|
|
213
|
+
content: {
|
|
178
214
|
type: "text";
|
|
179
215
|
text: string;
|
|
180
|
-
}
|
|
181
|
-
structuredContent
|
|
216
|
+
}[];
|
|
217
|
+
structuredContent: {
|
|
218
|
+
text: string;
|
|
219
|
+
};
|
|
182
220
|
}>;
|
|
183
221
|
export declare function buildServer(): Server<{
|
|
184
222
|
method: string;
|
|
@@ -41,13 +41,17 @@ async function requireWorkspace(cwd) {
|
|
|
41
41
|
}
|
|
42
42
|
return state;
|
|
43
43
|
}
|
|
44
|
+
// MCP clients may read structuredContent in preference to content when both are
|
|
45
|
+
// present. The tools whose payload IS prose — the phase prompts, the guide —
|
|
46
|
+
// therefore have to expose it structurally too, or such a client receives labels
|
|
47
|
+
// and no payload: codecarto_next returned no phase prompt at all (issue #94).
|
|
48
|
+
// Carrying the rendered text under a stable key keeps both client styles whole,
|
|
49
|
+
// and no tool declares an outputSchema that this could violate.
|
|
44
50
|
function textResult(text, structured) {
|
|
45
|
-
|
|
51
|
+
return {
|
|
46
52
|
content: [{ type: "text", text }],
|
|
53
|
+
structuredContent: { ...structured, text },
|
|
47
54
|
};
|
|
48
|
-
if (structured)
|
|
49
|
-
result.structuredContent = structured;
|
|
50
|
-
return result;
|
|
51
55
|
}
|
|
52
56
|
async function buildMcpPhasePrompt(state, phase, forced) {
|
|
53
57
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codecartographer-pi",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"mcpName": "io.github.HuginnIndustries/codecartographer",
|
|
5
5
|
"description": "Turn an unfamiliar codebase into a validated reimplementation spec, then synthesize confirmed specs and a product vision into a traceable plan.",
|
|
6
6
|
"type": "module",
|