@hasna/connectors 0.5.5 → 0.5.6
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/bin/index.js +27 -14
- package/bin/mcp.js +10 -10
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -7281,7 +7281,7 @@ var PRESETS = {
|
|
|
7281
7281
|
commerce: { description: "Commerce and finance", connectors: ["stripe", "shopify", "revolut", "mercury", "pandadoc"] }
|
|
7282
7282
|
};
|
|
7283
7283
|
var program2 = new Command;
|
|
7284
|
-
program2.name("connectors").description("Install API connectors for your project").version("0.5.
|
|
7284
|
+
program2.name("connectors").description("Install API connectors for your project").version("0.5.6").enablePositionalOptions();
|
|
7285
7285
|
program2.command("interactive", { isDefault: true }).alias("i").description("Interactive connector browser").action(() => {
|
|
7286
7286
|
if (!isTTY) {
|
|
7287
7287
|
console.log(`Non-interactive environment detected. Use a subcommand:
|
|
@@ -7646,10 +7646,11 @@ program2.command("info").argument("<connector>", "Connector name").option("--jso
|
|
|
7646
7646
|
const meta = getConnector(connector);
|
|
7647
7647
|
if (!meta) {
|
|
7648
7648
|
if (options.json) {
|
|
7649
|
-
console.log(JSON.stringify({ error: `Connector '${connector}' not found
|
|
7649
|
+
console.log(JSON.stringify({ error: `Connector '${connector}' not found. Run 'connectors list' to see available connectors.` }));
|
|
7650
7650
|
process.exit(1);
|
|
7651
7651
|
}
|
|
7652
7652
|
console.log(chalk2.red(`Connector '${connector}' not found`));
|
|
7653
|
+
console.log(chalk2.dim(`Run 'connectors list' to see available connectors, or 'connectors search ${connector}' to search.`));
|
|
7653
7654
|
process.exit(1);
|
|
7654
7655
|
return;
|
|
7655
7656
|
}
|
|
@@ -7674,9 +7675,10 @@ program2.command("docs").argument("<connector>", "Connector name").option("--jso
|
|
|
7674
7675
|
const meta = getConnector(connector);
|
|
7675
7676
|
if (!meta) {
|
|
7676
7677
|
if (options.json) {
|
|
7677
|
-
console.log(JSON.stringify({ error: `Connector '${connector}' not found
|
|
7678
|
+
console.log(JSON.stringify({ error: `Connector '${connector}' not found. Run 'connectors list' to see available connectors.` }));
|
|
7678
7679
|
} else {
|
|
7679
7680
|
console.log(chalk2.red(`Connector '${connector}' not found`));
|
|
7681
|
+
console.log(chalk2.dim(`Run 'connectors list' to see available connectors, or 'connectors search ${connector}' to search.`));
|
|
7680
7682
|
}
|
|
7681
7683
|
process.exit(1);
|
|
7682
7684
|
return;
|
|
@@ -7684,9 +7686,10 @@ program2.command("docs").argument("<connector>", "Connector name").option("--jso
|
|
|
7684
7686
|
const docs = getConnectorDocs(connector);
|
|
7685
7687
|
if (!docs) {
|
|
7686
7688
|
if (options.json) {
|
|
7687
|
-
console.log(JSON.stringify({ error: `No documentation found for '${connector}'
|
|
7689
|
+
console.log(JSON.stringify({ error: `No documentation found for '${connector}'. The connector may not be installed yet. Run 'connectors install ${connector}' first.` }));
|
|
7688
7690
|
} else {
|
|
7689
7691
|
console.log(chalk2.red(`No documentation found for '${connector}'`));
|
|
7692
|
+
console.log(chalk2.dim(`The connector may not be installed yet. Run 'connectors install ${connector}' first.`));
|
|
7690
7693
|
}
|
|
7691
7694
|
process.exit(1);
|
|
7692
7695
|
return;
|
|
@@ -7763,6 +7766,7 @@ program2.command("remove").alias("rm").argument("<connector>", "Connector to rem
|
|
|
7763
7766
|
console.log(chalk2.green(`\u2713 Removed ${connector}`));
|
|
7764
7767
|
} else {
|
|
7765
7768
|
console.log(chalk2.red(`\u2717 ${connector} is not installed`));
|
|
7769
|
+
console.log(chalk2.dim(`Run 'connectors install ${connector}' to install it, or 'connectors list --installed' to see installed connectors.`));
|
|
7766
7770
|
process.exit(1);
|
|
7767
7771
|
}
|
|
7768
7772
|
});
|
|
@@ -7814,7 +7818,7 @@ program2.command("update").argument("[connectors...]", "Specific connectors to u
|
|
|
7814
7818
|
console.log(JSON.stringify({ error: `Not installed: ${notInstalled.join(", ")}` }));
|
|
7815
7819
|
} else {
|
|
7816
7820
|
console.log(chalk2.red(`Not installed: ${notInstalled.join(", ")}`));
|
|
7817
|
-
console.log(chalk2.dim(
|
|
7821
|
+
console.log(chalk2.dim(`Run 'connectors install ${notInstalled[0]}' to install, or 'connectors list --installed' to see installed connectors.`));
|
|
7818
7822
|
}
|
|
7819
7823
|
process.exit(1);
|
|
7820
7824
|
return;
|
|
@@ -8130,9 +8134,10 @@ program2.command("auth").argument("<connector>", "Connector name to configure au
|
|
|
8130
8134
|
const meta = getConnector(connector);
|
|
8131
8135
|
if (!meta) {
|
|
8132
8136
|
if (options.json) {
|
|
8133
|
-
console.log(JSON.stringify({ error: `Connector '${connector}' not found
|
|
8137
|
+
console.log(JSON.stringify({ error: `Connector '${connector}' not found. Run 'connectors list' to see available connectors.` }));
|
|
8134
8138
|
} else {
|
|
8135
8139
|
console.log(chalk2.red(`Connector '${connector}' not found`));
|
|
8140
|
+
console.log(chalk2.dim(`Run 'connectors list' to see available connectors, or 'connectors search ${connector}' to search.`));
|
|
8136
8141
|
}
|
|
8137
8142
|
process.exit(1);
|
|
8138
8143
|
return;
|
|
@@ -9036,9 +9041,10 @@ program2.command("test").argument("[connector]", "Connector to test (default: al
|
|
|
9036
9041
|
if (connector) {
|
|
9037
9042
|
if (!getConnector(connector)) {
|
|
9038
9043
|
if (options.json) {
|
|
9039
|
-
console.log(JSON.stringify({ error: `Connector '${connector}' not found
|
|
9044
|
+
console.log(JSON.stringify({ error: `Connector '${connector}' not found. Run 'connectors list' to see available connectors.` }));
|
|
9040
9045
|
} else {
|
|
9041
9046
|
console.log(chalk2.red(`Connector '${connector}' not found`));
|
|
9047
|
+
console.log(chalk2.dim(`Run 'connectors list' to see available connectors, or 'connectors search ${connector}' to search.`));
|
|
9042
9048
|
}
|
|
9043
9049
|
process.exit(1);
|
|
9044
9050
|
return;
|
|
@@ -9064,15 +9070,15 @@ Testing connector credentials...
|
|
|
9064
9070
|
const auth = getAuthStatus(name);
|
|
9065
9071
|
const endpoint = TEST_ENDPOINTS[name];
|
|
9066
9072
|
if (!auth.configured) {
|
|
9067
|
-
results.push({ name, status: "no-key", message:
|
|
9073
|
+
results.push({ name, status: "no-key", message: `No credentials configured. Run 'connectors auth ${name}' or 'connectors setup ${name} --key <your-key>'` });
|
|
9068
9074
|
if (!options.json)
|
|
9069
|
-
console.log(` ${chalk2.dim("\u25CB")} ${chalk2.dim(name)} \u2014 ${chalk2.dim(
|
|
9075
|
+
console.log(` ${chalk2.dim("\u25CB")} ${chalk2.dim(name)} \u2014 ${chalk2.dim(`no credentials configured \u2014 run 'connectors auth ${name}'`)}`);
|
|
9070
9076
|
continue;
|
|
9071
9077
|
}
|
|
9072
9078
|
if (!endpoint) {
|
|
9073
|
-
results.push({ name, status: "skip", message:
|
|
9079
|
+
results.push({ name, status: "skip", message: `No test endpoint defined. Run 'connectors ops ${name}' to see available operations` });
|
|
9074
9080
|
if (!options.json)
|
|
9075
|
-
console.log(` ${chalk2.dim("\u25CB")} ${chalk2.dim(name)} \u2014 ${chalk2.dim(
|
|
9081
|
+
console.log(` ${chalk2.dim("\u25CB")} ${chalk2.dim(name)} \u2014 ${chalk2.dim(`no test endpoint \u2014 run 'connectors ops ${name}' to see operations`)}`);
|
|
9076
9082
|
continue;
|
|
9077
9083
|
}
|
|
9078
9084
|
const docs = getConnectorDocs(name);
|
|
@@ -9165,10 +9171,12 @@ Testing connector credentials...
|
|
|
9165
9171
|
console.log(` ${chalk2.green("\u2713")} ${chalk2.green(name)} \u2014 ${chalk2.dim(`${res.status} OK`)} ${chalk2.dim(`(${ms}ms)`)}`);
|
|
9166
9172
|
} else {
|
|
9167
9173
|
const body2 = await res.text().catch(() => "");
|
|
9168
|
-
const msg = res.status === 401 ?
|
|
9174
|
+
const msg = res.status === 401 ? `Invalid or expired credentials. Run 'connectors auth ${name}' to reconfigure` : `HTTP ${res.status}`;
|
|
9169
9175
|
results.push({ name, status: "fail", message: msg, ms });
|
|
9170
9176
|
if (!options.json)
|
|
9171
|
-
console.log(` ${chalk2.red("\u2717")} ${chalk2.red(name)} \u2014 ${chalk2.red(
|
|
9177
|
+
console.log(` ${chalk2.red("\u2717")} ${chalk2.red(name)} \u2014 ${chalk2.red(res.status === 401 ? "Invalid or expired credentials" : `HTTP ${res.status}`)} ${chalk2.dim(`(${ms}ms)`)}`);
|
|
9178
|
+
if (!options.json && res.status === 401)
|
|
9179
|
+
console.log(chalk2.dim(` \u2192 Run 'connectors auth ${name}' to reconfigure credentials`));
|
|
9172
9180
|
}
|
|
9173
9181
|
} catch (e) {
|
|
9174
9182
|
const ms = Date.now() - start;
|
|
@@ -9201,10 +9209,12 @@ program2.command("ops").description("List available API operations for a connect
|
|
|
9201
9209
|
const meta = getConnector(name);
|
|
9202
9210
|
if (!meta) {
|
|
9203
9211
|
console.error(chalk2.red(`Connector '${name}' not found.`));
|
|
9212
|
+
console.error(chalk2.dim(`Run 'connectors list' to see available connectors, or 'connectors search ${name}' to search.`));
|
|
9204
9213
|
process.exit(1);
|
|
9205
9214
|
}
|
|
9206
9215
|
if (!getConnectorCliPath(name)) {
|
|
9207
9216
|
console.error(chalk2.red(`Connector '${name}' does not have a CLI.`));
|
|
9217
|
+
console.error(chalk2.dim(`Run 'connectors docs ${name}' to see how to use this connector programmatically.`));
|
|
9208
9218
|
process.exit(1);
|
|
9209
9219
|
}
|
|
9210
9220
|
if (command) {
|
|
@@ -9247,10 +9257,12 @@ program2.command("run").description("Execute an API operation on a connector").a
|
|
|
9247
9257
|
const meta = getConnector(name);
|
|
9248
9258
|
if (!meta) {
|
|
9249
9259
|
console.error(chalk2.red(`Connector '${name}' not found.`));
|
|
9260
|
+
console.error(chalk2.dim(`Run 'connectors list' to see available connectors, or 'connectors search ${name}' to search.`));
|
|
9250
9261
|
process.exit(1);
|
|
9251
9262
|
}
|
|
9252
9263
|
if (!getConnectorCliPath(name)) {
|
|
9253
9264
|
console.error(chalk2.red(`Connector '${name}' does not have a CLI.`));
|
|
9265
|
+
console.error(chalk2.dim(`Run 'connectors docs ${name}' to see how to use this connector programmatically.`));
|
|
9254
9266
|
process.exit(1);
|
|
9255
9267
|
}
|
|
9256
9268
|
if (args.length === 0) {
|
|
@@ -9270,9 +9282,10 @@ program2.command("setup").argument("<name>", "Connector name to set up").option(
|
|
|
9270
9282
|
const meta = getConnector(name);
|
|
9271
9283
|
if (!meta) {
|
|
9272
9284
|
if (options.json) {
|
|
9273
|
-
console.log(JSON.stringify({ error: `Connector '${name}' not found
|
|
9285
|
+
console.log(JSON.stringify({ error: `Connector '${name}' not found. Run 'connectors list' to see available connectors.` }));
|
|
9274
9286
|
} else {
|
|
9275
9287
|
console.log(chalk2.red(`Connector '${name}' not found`));
|
|
9288
|
+
console.log(chalk2.dim(`Run 'connectors list' to see available connectors, or 'connectors search ${name}' to search.`));
|
|
9276
9289
|
}
|
|
9277
9290
|
process.exit(1);
|
|
9278
9291
|
return;
|
package/bin/mcp.js
CHANGED
|
@@ -20763,7 +20763,7 @@ async function getConnectorCommandHelp(name, command) {
|
|
|
20763
20763
|
loadConnectorVersions();
|
|
20764
20764
|
var server = new McpServer({
|
|
20765
20765
|
name: "connectors",
|
|
20766
|
-
version: "0.5.
|
|
20766
|
+
version: "0.5.6"
|
|
20767
20767
|
});
|
|
20768
20768
|
server.registerTool("search_connectors", {
|
|
20769
20769
|
title: "Search Connectors",
|
|
@@ -20802,7 +20802,7 @@ server.registerTool("list_connectors", {
|
|
|
20802
20802
|
content: [
|
|
20803
20803
|
{
|
|
20804
20804
|
type: "text",
|
|
20805
|
-
text: `Unknown category: "${category}".
|
|
20805
|
+
text: `Unknown category: "${category}". Use list_categories to see available categories: ${CATEGORIES.join(", ")}`
|
|
20806
20806
|
}
|
|
20807
20807
|
],
|
|
20808
20808
|
isError: true
|
|
@@ -20832,14 +20832,14 @@ server.registerTool("connector_docs", {
|
|
|
20832
20832
|
const meta = getConnector(name);
|
|
20833
20833
|
if (!meta) {
|
|
20834
20834
|
return {
|
|
20835
|
-
content: [{ type: "text", text: `Connector '${name}' not found.` }],
|
|
20835
|
+
content: [{ type: "text", text: `Connector '${name}' not found. Use search_connectors or list_connectors to find available connectors.` }],
|
|
20836
20836
|
isError: true
|
|
20837
20837
|
};
|
|
20838
20838
|
}
|
|
20839
20839
|
const docs = getConnectorDocs(name);
|
|
20840
20840
|
if (!docs) {
|
|
20841
20841
|
return {
|
|
20842
|
-
content: [{ type: "text", text: `No documentation found for '${name}'.` }],
|
|
20842
|
+
content: [{ type: "text", text: `No documentation found for '${name}'. Use install_connector to install it first.` }],
|
|
20843
20843
|
isError: true
|
|
20844
20844
|
};
|
|
20845
20845
|
}
|
|
@@ -20921,7 +20921,7 @@ server.registerTool("connector_info", {
|
|
|
20921
20921
|
const meta = getConnector(name);
|
|
20922
20922
|
if (!meta) {
|
|
20923
20923
|
return {
|
|
20924
|
-
content: [{ type: "text", text: `Connector '${name}' not found.` }],
|
|
20924
|
+
content: [{ type: "text", text: `Connector '${name}' not found. Use search_connectors or list_connectors to find available connectors.` }],
|
|
20925
20925
|
isError: true
|
|
20926
20926
|
};
|
|
20927
20927
|
}
|
|
@@ -20944,7 +20944,7 @@ server.registerTool("connector_auth_status", {
|
|
|
20944
20944
|
const meta = getConnector(name);
|
|
20945
20945
|
if (!meta) {
|
|
20946
20946
|
return {
|
|
20947
|
-
content: [{ type: "text", text: `Connector '${name}' not found.` }],
|
|
20947
|
+
content: [{ type: "text", text: `Connector '${name}' not found. Use search_connectors or list_connectors to find available connectors.` }],
|
|
20948
20948
|
isError: true
|
|
20949
20949
|
};
|
|
20950
20950
|
}
|
|
@@ -21022,7 +21022,7 @@ server.registerTool("list_connector_operations", {
|
|
|
21022
21022
|
const meta = getConnector(name);
|
|
21023
21023
|
if (!meta) {
|
|
21024
21024
|
return {
|
|
21025
|
-
content: [{ type: "text", text: `Connector '${name}' not found.` }],
|
|
21025
|
+
content: [{ type: "text", text: `Connector '${name}' not found. Use search_connectors or list_connectors to find available connectors.` }],
|
|
21026
21026
|
isError: true
|
|
21027
21027
|
};
|
|
21028
21028
|
}
|
|
@@ -21031,7 +21031,7 @@ server.registerTool("list_connector_operations", {
|
|
|
21031
21031
|
content: [
|
|
21032
21032
|
{
|
|
21033
21033
|
type: "text",
|
|
21034
|
-
text: `Connector '${name}' does not have a CLI. It may be API-only.`
|
|
21034
|
+
text: `Connector '${name}' does not have a CLI. It may be API-only. Use connector_docs to see how to use it programmatically.`
|
|
21035
21035
|
}
|
|
21036
21036
|
],
|
|
21037
21037
|
isError: true
|
|
@@ -21076,7 +21076,7 @@ server.registerTool("run_connector_operation", {
|
|
|
21076
21076
|
const meta = getConnector(name);
|
|
21077
21077
|
if (!meta) {
|
|
21078
21078
|
return {
|
|
21079
|
-
content: [{ type: "text", text: `Connector '${name}' not found.` }],
|
|
21079
|
+
content: [{ type: "text", text: `Connector '${name}' not found. Use search_connectors or list_connectors to find available connectors.` }],
|
|
21080
21080
|
isError: true
|
|
21081
21081
|
};
|
|
21082
21082
|
}
|
|
@@ -21132,7 +21132,7 @@ server.registerTool("setup_connector", {
|
|
|
21132
21132
|
const meta = getConnector(name);
|
|
21133
21133
|
if (!meta) {
|
|
21134
21134
|
return {
|
|
21135
|
-
content: [{ type: "text", text: `Connector '${name}' not found.` }],
|
|
21135
|
+
content: [{ type: "text", text: `Connector '${name}' not found. Use search_connectors or list_connectors to find available connectors.` }],
|
|
21136
21136
|
isError: true
|
|
21137
21137
|
};
|
|
21138
21138
|
}
|