@schemyx/mcp 0.1.5 → 0.1.7

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 CHANGED
@@ -89,6 +89,16 @@ The MCP package can also build local-only codebase configs for agents. This does
89
89
  items.json
90
90
  ```
91
91
 
92
+ For generation or editing, start with `schemyx_prepare_task`:
93
+
94
+ ```json
95
+ {
96
+ "task": "Build this page using Schemyx MCP"
97
+ }
98
+ ```
99
+
100
+ `schemyx_prepare_task` verifies or creates the local scan, resolves the task context pack, includes required source-backed reads through Schemyx, and returns the no-invention policy agents should follow before writing code.
101
+
92
102
  Use `schemyx_scan_codebase` with an explicit scope:
93
103
 
94
104
  ```json
@@ -1,11 +1,165 @@
1
- import type { ContextPackArgs, FreshnessArgs, GetArgs, GraphArgs, ListArgs, ReadFileArgs, RecipeRecord, ReviewArgs, ScanArgs, SearchArgs } from './types';
1
+ import type { CodebaseProjectType, ContextPackArgs, FreshnessArgs, GetArgs, GraphArgs, GraphEdge, ListArgs, PrepareTaskArgs, ReadFileArgs, RecipeRecord, ReviewArgs, ScanArgs, SearchArgs } from './types';
2
+ export declare function prepareTask(args?: PrepareTaskArgs): Promise<{
3
+ ok: boolean;
4
+ schema: string;
5
+ task: string;
6
+ rootPath: string;
7
+ outputDir: string;
8
+ projectType: CodebaseProjectType;
9
+ scan: {
10
+ ran: true;
11
+ reason: "missing-config" | "stale-config";
12
+ result: Awaited<ReturnType<typeof scanLocalCodebase>>;
13
+ } | {
14
+ ran: false;
15
+ reason: "existing-config" | "auto-scan-disabled";
16
+ scanId?: string;
17
+ };
18
+ freshness: {
19
+ ok: boolean;
20
+ schema: string;
21
+ scanId: string;
22
+ status: string;
23
+ stale: {
24
+ k: string;
25
+ path: string;
26
+ expectedHash?: string;
27
+ actualHash?: string;
28
+ }[];
29
+ missing: {
30
+ k: string;
31
+ path: string;
32
+ }[];
33
+ changed: {
34
+ k: string;
35
+ path: string;
36
+ }[];
37
+ } | null;
38
+ policy: {
39
+ startHere: string;
40
+ grounding: string;
41
+ toolUse: string;
42
+ rawRepoReads: string;
43
+ };
44
+ contextPack: {
45
+ ok: boolean;
46
+ schema: string;
47
+ scanId: string;
48
+ key: null;
49
+ status: string;
50
+ depth: import("./types").ContextDepth;
51
+ budget: {
52
+ targetTokens: number;
53
+ estimatedTokens: number;
54
+ sourceFilesIncluded: number;
55
+ };
56
+ items: never[];
57
+ review: never[];
58
+ policy?: undefined;
59
+ next?: undefined;
60
+ } | {
61
+ ok: boolean;
62
+ schema: string;
63
+ scanId: string;
64
+ key: string;
65
+ status: string;
66
+ depth: import("./types").ContextDepth;
67
+ policy: {
68
+ pageBuild?: boolean | undefined;
69
+ requiredRoot?: string | undefined;
70
+ sourceFallback?: string | undefined;
71
+ grounding: string;
72
+ rootKind: string;
73
+ };
74
+ budget: {
75
+ targetTokens: number;
76
+ estimatedTokens: number;
77
+ sourceFilesIncluded: number;
78
+ };
79
+ items: {
80
+ k: string;
81
+ why: string;
82
+ recipe: RecipeRecord | {
83
+ k: string;
84
+ g: "file" | "component" | "hook" | "route" | "api" | "controller" | "service" | "module" | "database" | "model" | "style" | "dependency" | "cluster" | "rule";
85
+ s: string;
86
+ d: string[];
87
+ u: string[];
88
+ p: string | undefined;
89
+ status: import("./types").RecipeStatus;
90
+ confidence: import("./types").Confidence;
91
+ v: Record<string, unknown>;
92
+ } | {
93
+ k: string;
94
+ g: "file" | "component" | "hook" | "route" | "api" | "controller" | "service" | "module" | "database" | "model" | "style" | "dependency" | "cluster" | "rule";
95
+ s: string;
96
+ p: string | undefined;
97
+ status: import("./types").RecipeStatus;
98
+ confidence: import("./types").Confidence;
99
+ d?: undefined;
100
+ u?: undefined;
101
+ v?: undefined;
102
+ };
103
+ }[];
104
+ review: import("./types").ReviewItem[];
105
+ next: ({
106
+ tool: string;
107
+ arguments: {
108
+ path: string | undefined;
109
+ maxBytes: number;
110
+ };
111
+ } | {
112
+ tool: string;
113
+ arguments: {
114
+ key: string;
115
+ depth: string;
116
+ includeDeps: boolean;
117
+ maxRelated: number;
118
+ };
119
+ })[];
120
+ };
121
+ requiredReads: {
122
+ tool: "schemyx_read_codebase_file";
123
+ arguments: ReadFileArgs;
124
+ }[];
125
+ sourceReads: {
126
+ tool: "schemyx_read_codebase_file";
127
+ arguments: ReadFileArgs;
128
+ result: {
129
+ ok: boolean;
130
+ schema: string;
131
+ scanId: string;
132
+ localOnly: boolean;
133
+ path: string;
134
+ bytes: number;
135
+ truncated: boolean;
136
+ content: string;
137
+ };
138
+ }[];
139
+ next: ({
140
+ tool: string;
141
+ arguments: {
142
+ path: string | undefined;
143
+ maxBytes: number;
144
+ };
145
+ } | {
146
+ tool: string;
147
+ arguments: {
148
+ key: string;
149
+ depth: string;
150
+ includeDeps: boolean;
151
+ maxRelated: number;
152
+ };
153
+ })[];
154
+ instructions: string[];
155
+ }>;
2
156
  export declare function scanLocalCodebase(args?: ScanArgs): Promise<{
3
157
  ok: boolean;
4
158
  schema: string;
5
159
  scanId: string;
6
160
  localOnly: boolean;
7
161
  privacy: string;
8
- projectType: import("./types").CodebaseProjectType;
162
+ projectType: CodebaseProjectType;
9
163
  rootPath: string;
10
164
  outputDir: string;
11
165
  dryRun: boolean;
@@ -29,14 +183,16 @@ export declare function scanLocalCodebase(args?: ScanArgs): Promise<{
29
183
  arguments: {
30
184
  query: string;
31
185
  limit: number;
32
- status?: undefined;
186
+ rootPath: string;
187
+ outputDir: string;
33
188
  };
34
189
  } | {
35
190
  tool: string;
36
191
  arguments: {
37
192
  status: string;
38
193
  limit: number;
39
- query?: undefined;
194
+ rootPath: string;
195
+ outputDir: string;
40
196
  };
41
197
  })[];
42
198
  }>;
@@ -124,6 +280,8 @@ export declare function getContextPack(args?: ContextPackArgs): Promise<{
124
280
  };
125
281
  items: never[];
126
282
  review: never[];
283
+ policy?: undefined;
284
+ next?: undefined;
127
285
  } | {
128
286
  ok: boolean;
129
287
  schema: string;
@@ -131,6 +289,13 @@ export declare function getContextPack(args?: ContextPackArgs): Promise<{
131
289
  key: string;
132
290
  status: string;
133
291
  depth: import("./types").ContextDepth;
292
+ policy: {
293
+ pageBuild?: boolean | undefined;
294
+ requiredRoot?: string | undefined;
295
+ sourceFallback?: string | undefined;
296
+ grounding: string;
297
+ rootKind: string;
298
+ };
134
299
  budget: {
135
300
  targetTokens: number;
136
301
  estimatedTokens: number;
@@ -162,13 +327,28 @@ export declare function getContextPack(args?: ContextPackArgs): Promise<{
162
327
  };
163
328
  }[];
164
329
  review: import("./types").ReviewItem[];
330
+ next: ({
331
+ tool: string;
332
+ arguments: {
333
+ path: string | undefined;
334
+ maxBytes: number;
335
+ };
336
+ } | {
337
+ tool: string;
338
+ arguments: {
339
+ key: string;
340
+ depth: string;
341
+ includeDeps: boolean;
342
+ maxRelated: number;
343
+ };
344
+ })[];
165
345
  }>;
166
346
  export declare function getCodebaseGraph(args?: GraphArgs): Promise<{
167
347
  ok: boolean;
168
348
  schema: string;
169
349
  scanId: string;
170
350
  nodes: import("./types").GraphNode[];
171
- edges: import("./types").GraphEdge[];
351
+ edges: GraphEdge[];
172
352
  page: {
173
353
  limitNodes: number;
174
354
  limitEdges: number;