@mandujs/mcp 0.18.9 → 0.18.10
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 +0 -1
- package/package.json +42 -42
- package/src/activity-monitor.ts +9 -8
- package/src/adapters/tool-adapter.ts +2 -0
- package/src/executor/error-handler.ts +268 -250
- package/src/index.ts +8 -0
- package/src/new-resources.ts +119 -0
- package/src/profiles.ts +34 -0
- package/src/prompts.ts +104 -0
- package/src/resources/handlers.ts +0 -23
- package/src/server.ts +78 -5
- package/src/tools/ate.ts +28 -0
- package/src/tools/brain.ts +56 -24
- package/src/tools/component.ts +194 -185
- package/src/tools/composite.ts +440 -0
- package/src/tools/contract.ts +58 -58
- package/src/tools/decisions.ts +270 -0
- package/src/tools/generate.ts +23 -21
- package/src/tools/guard.ts +32 -708
- package/src/tools/history.ts +24 -7
- package/src/tools/hydration.ts +40 -13
- package/src/tools/index.ts +28 -2
- package/src/tools/kitchen.ts +107 -0
- package/src/tools/negotiate.ts +263 -0
- package/src/tools/project.ts +464 -382
- package/src/tools/resource.ts +19 -2
- package/src/tools/runtime.ts +533 -508
- package/src/tools/seo.ts +446 -417
- package/src/tools/slot-validation.ts +200 -0
- package/src/tools/slot.ts +20 -25
- package/src/tools/spec.ts +45 -43
- package/src/tools/transaction.ts +55 -13
- package/src/tx-lock.ts +73 -0
- package/src/utils/project.ts +48 -9
- package/src/utils/runtime-control.ts +52 -0
- package/src/utils/withWarnings.ts +2 -1
package/src/tools/resource.ts
CHANGED
|
@@ -25,6 +25,10 @@ import fs from "fs/promises";
|
|
|
25
25
|
export const resourceToolDefinitions: Tool[] = [
|
|
26
26
|
{
|
|
27
27
|
name: "mandu.resource.create",
|
|
28
|
+
annotations: {
|
|
29
|
+
destructiveHint: true,
|
|
30
|
+
readOnlyHint: false,
|
|
31
|
+
},
|
|
28
32
|
description:
|
|
29
33
|
"Create a new resource with schema definition. " +
|
|
30
34
|
"Generates schema file in spec/resources/{name}/schema.ts and creates " +
|
|
@@ -93,6 +97,9 @@ export const resourceToolDefinitions: Tool[] = [
|
|
|
93
97
|
},
|
|
94
98
|
{
|
|
95
99
|
name: "mandu.resource.list",
|
|
100
|
+
annotations: {
|
|
101
|
+
readOnlyHint: true,
|
|
102
|
+
},
|
|
96
103
|
description:
|
|
97
104
|
"List all resources in the project. " +
|
|
98
105
|
"Scans spec/resources/ directory and returns resource names with field summaries.",
|
|
@@ -104,6 +111,9 @@ export const resourceToolDefinitions: Tool[] = [
|
|
|
104
111
|
},
|
|
105
112
|
{
|
|
106
113
|
name: "mandu.resource.get",
|
|
114
|
+
annotations: {
|
|
115
|
+
readOnlyHint: true,
|
|
116
|
+
},
|
|
107
117
|
description:
|
|
108
118
|
"Get detailed information about a specific resource. " +
|
|
109
119
|
"Returns full schema definition including fields, types, and options.",
|
|
@@ -120,6 +130,9 @@ export const resourceToolDefinitions: Tool[] = [
|
|
|
120
130
|
},
|
|
121
131
|
{
|
|
122
132
|
name: "mandu.resource.addField",
|
|
133
|
+
annotations: {
|
|
134
|
+
readOnlyHint: false,
|
|
135
|
+
},
|
|
123
136
|
description:
|
|
124
137
|
"Add a new field to an existing resource schema. " +
|
|
125
138
|
"⚠️ IMPORTANT: Preserves custom slot logic by using force: false during regeneration. " +
|
|
@@ -168,6 +181,10 @@ export const resourceToolDefinitions: Tool[] = [
|
|
|
168
181
|
},
|
|
169
182
|
{
|
|
170
183
|
name: "mandu.resource.removeField",
|
|
184
|
+
annotations: {
|
|
185
|
+
destructiveHint: true,
|
|
186
|
+
readOnlyHint: false,
|
|
187
|
+
},
|
|
171
188
|
description:
|
|
172
189
|
"Remove a field from an existing resource schema. " +
|
|
173
190
|
"Updates schema file and regenerates artifacts with force: false to preserve slots.",
|
|
@@ -563,7 +580,7 @@ export function resourceTools(projectRoot: string) {
|
|
|
563
580
|
message: `Field '${fieldName}' added to resource '${resourceName}'. ${force ? "⚠️ Slots overwritten!" : "Slots preserved."}`,
|
|
564
581
|
tip: force
|
|
565
582
|
? "⚠️ Custom slot logic was overwritten because force: true was used"
|
|
566
|
-
: "Custom slot logic preserved. Run
|
|
583
|
+
: "Custom slot logic preserved. Run mandu.generate to apply changes to all resources.",
|
|
567
584
|
};
|
|
568
585
|
} catch (error) {
|
|
569
586
|
return {
|
|
@@ -641,7 +658,7 @@ export function resourceTools(projectRoot: string) {
|
|
|
641
658
|
slotsPreserved: result.skipped,
|
|
642
659
|
remainingFields: Object.keys(definition.fields),
|
|
643
660
|
message: `Field '${fieldName}' removed from resource '${resourceName}'. Slots preserved.`,
|
|
644
|
-
tip: "Run
|
|
661
|
+
tip: "Run mandu.generate to apply changes to all resources",
|
|
645
662
|
};
|
|
646
663
|
} catch (error) {
|
|
647
664
|
return {
|