@path58/p58-n8n 0.2.8 → 0.2.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/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.10] - 2026-03-11
9
+
10
+ ### Fixed
11
+
12
+ - **Webhook URL construction bug** — `extractWebhookPath` incorrectly prefixed `{workflowId}/{encodedNodeName}/` to the webhook path, producing URLs like `/webhook/4aDOC5YlrPOTUTgm/webhook/langchain-test-029` instead of `/webhook/langchain-test-029`. This caused 404 errors on every webhook-triggered `test_workflow` and `execute_workflow` call. n8n production webhooks listen at `/webhook/{path}` with no prefix.
13
+
14
+ ## [0.2.9] - 2026-03-11
15
+
16
+ ### Fixed
17
+
18
+ - **`execute_workflow` `not_found` guidance** — When the webhook POST completes but no execution record is found in n8n (rare timing race), the response now includes actionable guidance to retry instead of the opaque `"Execution status: not_found."` message.
19
+ - **`setup_check` DB health** — Now runs a live `SELECT 1` against the database and reports `db_connected` and `db_error` (exact error string) in the diagnostic output. `catalog_ready` now reflects actual DB reachability instead of always returning `true`. Issues list surfaces DB errors (e.g., circuit breaker) with guidance.
20
+
8
21
  ## [0.2.8] - 2026-03-11
9
22
 
10
23
  ### Fixed
@@ -18473,7 +18473,7 @@ var import_types22 = require("@modelcontextprotocol/sdk/types.js");
18473
18473
  var config = {
18474
18474
  // Server identity
18475
18475
  SERVER_NAME: "p58-n8n",
18476
- SERVER_VERSION: "0.2.8",
18476
+ SERVER_VERSION: "0.2.10",
18477
18477
  // Database configuration (from environment)
18478
18478
  SUPABASE_URL: process.env.SUPABASE_URL,
18479
18479
  SUPABASE_KEY: process.env.SUPABASE_KEY,
@@ -37464,16 +37464,7 @@ function extractWebhookPath(workflow) {
37464
37464
  if (!trigger)
37465
37465
  return null;
37466
37466
  const params = trigger.parameters ?? {};
37467
- const shortPath = typeof params.path === "string" && params.path.length > 0 && params.path || typeof params.webhookId === "string" && params.webhookId.length > 0 && params.webhookId || typeof trigger.webhookId === "string" && trigger.webhookId.length > 0 && trigger.webhookId || null;
37468
- if (!shortPath)
37469
- return null;
37470
- const wfId = workflow.id;
37471
- const nodeName = trigger.name ?? "Webhook";
37472
- if (wfId) {
37473
- const encodedNodeName = encodeURIComponent(String(nodeName).toLowerCase());
37474
- return `${wfId}/${encodedNodeName}/${shortPath}`;
37475
- }
37476
- return shortPath;
37467
+ return typeof params.path === "string" && params.path.length > 0 && params.path || typeof params.webhookId === "string" && params.webhookId.length > 0 && params.webhookId || typeof trigger.webhookId === "string" && trigger.webhookId.length > 0 && trigger.webhookId || null;
37477
37468
  }
37478
37469
  function buildN8nHostUrl() {
37479
37470
  const apiBase = process.env.N8N_API_BASE_URL ?? process.env.N8N_API_URL ?? "http://localhost:5678/api/v1";
@@ -37973,7 +37964,7 @@ async function executeViaClone(config3, workflow, inputData, timeoutMs) {
37973
37964
  } catch {
37974
37965
  }
37975
37966
  }
37976
- const note = executionStatus === "error" && executionError ? `Execution failed: ${executionError}. See node_debug for the failing node details. Fix the issue and call execute_workflow again.` : executionStatus === "success" ? `Workflow executed successfully via temporary clone. Original workflow (${workflow.id}) is now active.` : `Execution status: ${executionStatus}.`;
37967
+ const note = executionStatus === "error" && executionError ? `Execution failed: ${executionError}. See node_debug for the failing node details. Fix the issue and call execute_workflow again.` : executionStatus === "success" ? `Workflow executed successfully via temporary clone. Original workflow (${workflow.id}) is now active.` : executionStatus === "not_found" ? `Webhook POST completed but no execution record was found in n8n. This can happen when n8n drops the execution before recording it. Retry execute_workflow once \u2014 if it fails again, check n8n logs for errors.` : `Execution status: ${executionStatus}.`;
37977
37968
  return {
37978
37969
  executionId,
37979
37970
  result: { status: executionStatus, node_debug },
@@ -44465,6 +44456,7 @@ When values are collected, marks matching factory.gaps entries as resolved for a
44465
44456
  };
44466
44457
 
44467
44458
  // dist/mcp/tools/handlers/setup-check.js
44459
+ init_validatorPostgresClient();
44468
44460
  var SETUP_GUIDE_URL2 = "https://github.com/tsvika58/p58-n8n/blob/main/docs/AGENT_INSTALL.md";
44469
44461
  var N8N_PROBE_TIMEOUT_MS = 2e3;
44470
44462
  var N8N_PROBE_PORTS = [5678, 5679];
@@ -44497,7 +44489,16 @@ function buildToolCounts() {
44497
44489
  const tier1 = OFFLINE_TOOLS.size;
44498
44490
  return { tier1, tier2_7: total - tier1 };
44499
44491
  }
44500
- function collectIssues(apiKeySet, n8nConnected, probes) {
44492
+ async function checkDbHealth() {
44493
+ try {
44494
+ await validatorQuery("SELECT 1 AS ok", []);
44495
+ return { connected: true };
44496
+ } catch (err) {
44497
+ const msg = err instanceof Error ? err.message : String(err);
44498
+ return { connected: false, error: msg };
44499
+ }
44500
+ }
44501
+ function collectIssues(apiKeySet, n8nConnected, probes, dbConnected, dbError) {
44501
44502
  const issues = [];
44502
44503
  if (!apiKeySet) {
44503
44504
  issues.push("N8N_API_KEY not set \u2014 Tier 2-7 deploy tools unavailable");
@@ -44515,6 +44516,10 @@ function collectIssues(apiKeySet, n8nConnected, probes) {
44515
44516
  if (apiKeySet && !n8nConnected) {
44516
44517
  issues.push("N8N_API_KEY is set but n8n is unreachable \u2014 check N8N_API_URL and ensure n8n is running");
44517
44518
  }
44519
+ if (!dbConnected) {
44520
+ const detail = dbError ? `: ${dbError}` : "";
44521
+ issues.push(`Database unavailable${detail} \u2014 catalog features degraded, pattern fallback active`);
44522
+ }
44518
44523
  return issues;
44519
44524
  }
44520
44525
  async function buildReport() {
@@ -44527,7 +44532,8 @@ async function buildReport() {
44527
44532
  if (!n8nUrl) {
44528
44533
  probes = await discoverN8nInstances();
44529
44534
  }
44530
- const issues = collectIssues(apiKeySet, n8nConnected, probes);
44535
+ const dbHealth = await checkDbHealth();
44536
+ const issues = collectIssues(apiKeySet, n8nConnected, probes, dbHealth.connected, dbHealth.error);
44531
44537
  const toolCounts = buildToolCounts();
44532
44538
  const report = {
44533
44539
  server_version: config.SERVER_VERSION,
@@ -44536,7 +44542,9 @@ async function buildReport() {
44536
44542
  n8n_connected: n8nConnected,
44537
44543
  n8n_api_key_set: apiKeySet,
44538
44544
  credential_count: credentialCount,
44539
- catalog_ready: true,
44545
+ catalog_ready: dbHealth.connected,
44546
+ db_connected: dbHealth.connected,
44547
+ ...dbHealth.error ? { db_error: dbHealth.error } : {},
44540
44548
  tools_available: toolCounts,
44541
44549
  issues,
44542
44550
  setup_guide: SETUP_GUIDE_URL2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@path58/p58-n8n",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "The smartest and fastest n8n MCP server — validate, fix, and discover workflows inside your LLM",
5
5
  "keywords": [
6
6
  "mcp",