@thehammer/schema-mcp-server 1.0.8 → 1.0.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.
@@ -41,10 +41,27 @@ export declare function submitQualityGateReview(itemId: number, status: string,
41
41
  /**
42
42
  * Check (or kick off) quality gate review for a single category.
43
43
  *
44
- * Returns one of: passed (cache hit), running (reviewer dispatched or in flight),
45
- * failed (items need fixes with analysis). The orchestrator uses this as its
46
- * primary quality-gate entry point call once per category when 100% done with
47
- * that category's work.
44
+ * NON-BLOCKING. A single HTTP round-trip. The agent NEVER waits inside MCP
45
+ * blocking hides dispatch failures behind timeouts and ties up the agent when
46
+ * it could be doing other productive work.
47
+ *
48
+ * Returns one of:
49
+ * - `passed` — all items green (cache hit or fresh review)
50
+ * - `failed` — items need fixes; response includes each item's `analysis`
51
+ * - `running` — a reviewer is dispatched (or already in flight); call again later
52
+ * - `error` — a prior reviewer dispatch failed at this iteration; manual
53
+ * intervention needed. Do NOT retry on this category; surface to the user
54
+ * via an annotation.
55
+ *
56
+ * Recommended pattern:
57
+ * 1. Call `quality_gate(A)` — reviewer is launched by the backend on the
58
+ * first running-with-pending-items response
59
+ * 2. Do other productive work (work on other categories, read annotations,
60
+ * preview templates, call `quality_gate(B)` in parallel)
61
+ * 3. Call `quality_gate(A)` again later to poll. The backend is idempotent:
62
+ * won't launch a second reviewer while the first is running.
63
+ * 4. When the agent has no other productive work, it still polls — each poll
64
+ * is cheap, short, and carries minimal context.
48
65
  */
49
66
  export declare function callQualityGate(category: string, message?: string): Promise<ApiResponse>;
50
67
  /**
@@ -180,10 +180,27 @@ export async function submitQualityGateReview(itemId, status, analysis, message)
180
180
  /**
181
181
  * Check (or kick off) quality gate review for a single category.
182
182
  *
183
- * Returns one of: passed (cache hit), running (reviewer dispatched or in flight),
184
- * failed (items need fixes with analysis). The orchestrator uses this as its
185
- * primary quality-gate entry point call once per category when 100% done with
186
- * that category's work.
183
+ * NON-BLOCKING. A single HTTP round-trip. The agent NEVER waits inside MCP
184
+ * blocking hides dispatch failures behind timeouts and ties up the agent when
185
+ * it could be doing other productive work.
186
+ *
187
+ * Returns one of:
188
+ * - `passed` — all items green (cache hit or fresh review)
189
+ * - `failed` — items need fixes; response includes each item's `analysis`
190
+ * - `running` — a reviewer is dispatched (or already in flight); call again later
191
+ * - `error` — a prior reviewer dispatch failed at this iteration; manual
192
+ * intervention needed. Do NOT retry on this category; surface to the user
193
+ * via an annotation.
194
+ *
195
+ * Recommended pattern:
196
+ * 1. Call `quality_gate(A)` — reviewer is launched by the backend on the
197
+ * first running-with-pending-items response
198
+ * 2. Do other productive work (work on other categories, read annotations,
199
+ * preview templates, call `quality_gate(B)` in parallel)
200
+ * 3. Call `quality_gate(A)` again later to poll. The backend is idempotent:
201
+ * won't launch a second reviewer while the first is running.
202
+ * 4. When the agent has no other productive work, it still polls — each poll
203
+ * is cheap, short, and carries minimal context.
187
204
  */
188
205
  export async function callQualityGate(category, message) {
189
206
  return apiRequest("POST", mcpPath("quality-gate"), {
package/dist/index.js CHANGED
@@ -681,14 +681,18 @@ if (shouldRegister("quality_gate_submit_review"))
681
681
  return jsonResult(result);
682
682
  });
683
683
  if (shouldRegister("quality_gate"))
684
- server.tool("quality_gate", "Run the quality gate for a single category (schema, directive, or template). " +
685
- "Call this when you are 100% done with that category's work — it either returns cached " +
686
- "results instantly or dispatches a reviewer. Response statuses: " +
684
+ server.tool("quality_gate", "Dispatch or poll the quality gate for a single category (schema, directive, or template). " +
685
+ "NON-BLOCKING the call returns immediately. Response statuses: " +
687
686
  "'passed' means all items in the category are green (safe to move on); " +
688
- "'running' means a reviewer is in flight — do other useful work and call again later; " +
689
- "'failed' means items need fixes read each item's `analysis`, apply fixes via mutation " +
690
- "tools (which auto-invalidate the category), then re-call this tool. " +
691
- "You may call this for different categories in parallel while sub-agents are running.", {
687
+ "'running' means a reviewer was dispatched (or one is already in flight) — do other " +
688
+ "productive work, then call this tool again later to check status; " +
689
+ "'failed' means items need fixes read each item's `analysis`, apply fixes via " +
690
+ "mutation tools (which auto-invalidate the category), then call this tool again; " +
691
+ "'error' means the reviewer dispatch itself failed — surface the error to the user " +
692
+ "via an annotation and stop on that category (do NOT retry). " +
693
+ "You may call this for multiple categories in parallel. The backend is idempotent — " +
694
+ "calling while a reviewer is running returns 'running' without launching a duplicate. " +
695
+ "When you have no other productive work, continue polling — each call is cheap.", {
692
696
  category: z
693
697
  .enum(["schema", "directive", "template"])
694
698
  .describe("The quality gate category to check. Must be one of: schema, directive, template."),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/schema-mcp-server",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "MCP server for Schema Builder - translates Claude Code tool calls into Laravel API requests",
5
5
  "license": "MIT",
6
6
  "repository": {