@vantageos/vantage-registry-mcp 1.4.0 → 1.5.0

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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/server.js +41 -4
  3. package/server.ts +67 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vantageos/vantage-registry-mcp",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "MCP server exposing VantageRegistry Convex functions as Claude Code tools",
5
5
  "type": "module",
6
6
  "bin": {
package/server.js CHANGED
@@ -56,7 +56,7 @@ var hookEventSchema = z.enum([
56
56
  "UserPromptSubmit"
57
57
  ]).describe("Hook lifecycle event");
58
58
  var runbookStatusSchema = z.enum(["draft", "published", "deprecated"]).describe("Runbook status");
59
- var templateTypeSchema = z.enum(["mission", "document", "checklist"]).describe("Template type");
59
+ var templateTypeSchema = z.enum(["standard", "mission", "brief", "runbook", "document", "checklist"]).describe("Template type");
60
60
  var linkTypeSchema = z.enum(["uses", "produces", "references"]).describe(
61
61
  "Link type \u2014 uses: template consumed during execution, produces: output document generated, references: informational cross-reference"
62
62
  );
@@ -64,7 +64,7 @@ var convexUrl = loadConvexUrl();
64
64
  var convex = new ConvexHttpClient(convexUrl);
65
65
  var server = new McpServer({
66
66
  name: "vantage-registry",
67
- version: "1.4.0"
67
+ version: "1.5.0"
68
68
  });
69
69
  server.tool(
70
70
  "upsert_team",
@@ -770,13 +770,20 @@ server.tool(
770
770
  );
771
771
  server.tool(
772
772
  "upsert_template",
773
- "Create or update a template in VantageRegistry. Upserts by name.",
773
+ "Create or update a template in VantageRegistry. Upserts by name. contentHash is auto-computed server-side (sha256 of content) when omitted.",
774
774
  {
775
775
  name: z.string().describe("Template name \u2014 e.g. 'agent-brief', 'skill-md'"),
776
776
  team: z.string().optional().describe("Team this template belongs to \u2014 defaults to 'global'"),
777
777
  purpose: z.string().describe("What this template is used for"),
778
778
  content: z.string().describe("Full template content"),
779
- version: z.string().optional().describe("Semantic version \u2014 e.g. '1.0.0'")
779
+ version: z.string().optional().describe("Semantic version \u2014 e.g. '1.0.0'"),
780
+ template_type: templateTypeSchema.optional().describe(
781
+ "Template type: standard, mission, brief, runbook, document, or checklist"
782
+ ),
783
+ category: z.string().optional().describe("Category \u2014 e.g. 'standards/fleet-shared'"),
784
+ contentHash: z.string().optional().describe("sha256 of content \u2014 auto-computed server-side when omitted"),
785
+ sourceCommit: z.string().optional().describe("Git commit SHA the template content was sourced from"),
786
+ sourceRepo: z.string().optional().describe("Git repo the template content was sourced from")
780
787
  },
781
788
  async (args) => {
782
789
  const id = await convex.mutation(api.templates.upsert, args);
@@ -820,6 +827,36 @@ server.tool(
820
827
  };
821
828
  }
822
829
  );
830
+ server.tool(
831
+ "detect_template_drift",
832
+ "Return the VR-side sha256 contentHash + provenance (sourceCommit, sourceRepo) for each template in scope. IMPORTANT: Convex queries have no filesystem access. This tool returns the VR canonical contentHash so the caller can read the source file, compute its SHA256, and compare. name=<slug> filters to a single template; omit name to return every template.",
833
+ {
834
+ name: z.string().optional().describe("Template slug \u2014 filter to a single template")
835
+ },
836
+ async ({ name }) => {
837
+ const result = await convex.query(api.templates.detectTemplateDrift, {
838
+ name
839
+ });
840
+ return {
841
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
842
+ };
843
+ }
844
+ );
845
+ server.tool(
846
+ "list_templates_by_category",
847
+ "List templates for a specific category using the byCategory index.",
848
+ {
849
+ category: z.string().describe("Category to filter by \u2014 e.g. 'standards/fleet-shared'")
850
+ },
851
+ async ({ category }) => {
852
+ const result = await convex.query(api.templates.listTemplatesByCategory, {
853
+ category
854
+ });
855
+ return {
856
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
857
+ };
858
+ }
859
+ );
823
860
  server.tool(
824
861
  "upsert_test_run",
825
862
  "Insert a skill quality test run and update denormalized quality fields on the parent skill (lastTestedAt, lastReviewerScore, lastEvalDelta, testStatus). reviewerScore format is 'X/Y' e.g. '37/45'. evalDelta is pp delta vs without-skill baseline.",
package/server.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * upsert_plugin, list_plugins, get_plugin
11
11
  * upsert_hook, list_hooks, get_hook
12
12
  * upsert_prompt, list_prompts, get_prompt
13
- * upsert_template, list_templates, get_template
13
+ * upsert_template, list_templates, get_template, detect_template_drift, list_templates_by_category
14
14
  * upsert_runbook, get_runbook, list_runbooks, list_runbooks_by_category, list_runbooks_by_team, delete_runbook
15
15
  * link_runbook_template, unlink_runbook_template, list_templates_for_runbook, list_runbooks_for_template
16
16
  * register_component, list_components, get_component, search_components, update_component, delete_component
@@ -112,7 +112,7 @@ const runbookStatusSchema = z
112
112
  .describe("Runbook status");
113
113
 
114
114
  const templateTypeSchema = z
115
- .enum(["mission", "document", "checklist"])
115
+ .enum(["standard", "mission", "brief", "runbook", "document", "checklist"])
116
116
  .describe("Template type");
117
117
 
118
118
  const linkTypeSchema = z
@@ -130,7 +130,7 @@ const convex = new ConvexHttpClient(convexUrl);
130
130
 
131
131
  const server = new McpServer({
132
132
  name: "vantage-registry",
133
- version: "1.4.0",
133
+ version: "1.5.0",
134
134
  });
135
135
 
136
136
  // ═══════════════════════════════════════════════════════════════════════════════
@@ -1115,7 +1115,8 @@ server.tool(
1115
1115
 
1116
1116
  server.tool(
1117
1117
  "upsert_template",
1118
- "Create or update a template in VantageRegistry. Upserts by name.",
1118
+ "Create or update a template in VantageRegistry. Upserts by name. " +
1119
+ "contentHash is auto-computed server-side (sha256 of content) when omitted.",
1119
1120
  {
1120
1121
  name: z.string().describe("Template name — e.g. 'agent-brief', 'skill-md'"),
1121
1122
  team: z
@@ -1125,6 +1126,27 @@ server.tool(
1125
1126
  purpose: z.string().describe("What this template is used for"),
1126
1127
  content: z.string().describe("Full template content"),
1127
1128
  version: z.string().optional().describe("Semantic version — e.g. '1.0.0'"),
1129
+ template_type: templateTypeSchema
1130
+ .optional()
1131
+ .describe(
1132
+ "Template type: standard, mission, brief, runbook, document, or checklist",
1133
+ ),
1134
+ category: z
1135
+ .string()
1136
+ .optional()
1137
+ .describe("Category — e.g. 'standards/fleet-shared'"),
1138
+ contentHash: z
1139
+ .string()
1140
+ .optional()
1141
+ .describe("sha256 of content — auto-computed server-side when omitted"),
1142
+ sourceCommit: z
1143
+ .string()
1144
+ .optional()
1145
+ .describe("Git commit SHA the template content was sourced from"),
1146
+ sourceRepo: z
1147
+ .string()
1148
+ .optional()
1149
+ .describe("Git repo the template content was sourced from"),
1128
1150
  },
1129
1151
  async (args) => {
1130
1152
  const id = await convex.mutation(api.templates.upsert, args);
@@ -1173,6 +1195,47 @@ server.tool(
1173
1195
  },
1174
1196
  );
1175
1197
 
1198
+ server.tool(
1199
+ "detect_template_drift",
1200
+ "Return the VR-side sha256 contentHash + provenance (sourceCommit, sourceRepo) " +
1201
+ "for each template in scope. IMPORTANT: Convex queries have no filesystem access. " +
1202
+ "This tool returns the VR canonical contentHash so the caller can read the source " +
1203
+ "file, compute its SHA256, and compare. name=<slug> filters to a single template; " +
1204
+ "omit name to return every template.",
1205
+ {
1206
+ name: z
1207
+ .string()
1208
+ .optional()
1209
+ .describe("Template slug — filter to a single template"),
1210
+ },
1211
+ async ({ name }) => {
1212
+ const result = await convex.query(api.templates.detectTemplateDrift, {
1213
+ name,
1214
+ });
1215
+ return {
1216
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
1217
+ };
1218
+ },
1219
+ );
1220
+
1221
+ server.tool(
1222
+ "list_templates_by_category",
1223
+ "List templates for a specific category using the byCategory index.",
1224
+ {
1225
+ category: z
1226
+ .string()
1227
+ .describe("Category to filter by — e.g. 'standards/fleet-shared'"),
1228
+ },
1229
+ async ({ category }) => {
1230
+ const result = await convex.query(api.templates.listTemplatesByCategory, {
1231
+ category,
1232
+ });
1233
+ return {
1234
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
1235
+ };
1236
+ },
1237
+ );
1238
+
1176
1239
  // ═══════════════════════════════════════════════════════════════════════════════
1177
1240
  // SKILL TEST RUNS
1178
1241
  // ═══════════════════════════════════════════════════════════════════════════════