@yawlabs/tailscale-mcp 0.11.0 → 0.11.1
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/dist/index.js +9 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31318,6 +31318,9 @@ function filterTools(groups, options) {
|
|
|
31318
31318
|
}
|
|
31319
31319
|
|
|
31320
31320
|
// src/server-wiring.ts
|
|
31321
|
+
function isLocalCliEnabled(env) {
|
|
31322
|
+
return env.TAILSCALE_LOCAL_CLI === "1" || env.TAILSCALE_LOCAL_CLI === "true";
|
|
31323
|
+
}
|
|
31321
31324
|
function wrapToolHandler(tool) {
|
|
31322
31325
|
return async (input) => {
|
|
31323
31326
|
try {
|
|
@@ -32627,10 +32630,12 @@ async function runTailscaleCli(args, options = {}) {
|
|
|
32627
32630
|
}
|
|
32628
32631
|
|
|
32629
32632
|
// src/tools/local-cli.ts
|
|
32633
|
+
var HOSTNAME_LABEL = /^[a-zA-Z0-9_]([a-zA-Z0-9_-]*[a-zA-Z0-9_])?$/;
|
|
32630
32634
|
function isValidPingTarget(s) {
|
|
32631
32635
|
if (s.length === 0 || s.length > 253) return false;
|
|
32632
32636
|
if (net2.isIP(s)) return true;
|
|
32633
|
-
|
|
32637
|
+
const labels = s.split(".");
|
|
32638
|
+
return labels.every((label) => label.length >= 1 && label.length <= 63 && HOSTNAME_LABEL.test(label));
|
|
32634
32639
|
}
|
|
32635
32640
|
var localCliTools = [
|
|
32636
32641
|
{
|
|
@@ -33606,7 +33611,7 @@ var webhookTools = [
|
|
|
33606
33611
|
];
|
|
33607
33612
|
|
|
33608
33613
|
// src/index.ts
|
|
33609
|
-
var version2 = true ? "0.11.
|
|
33614
|
+
var version2 = true ? "0.11.1" : (await null).createRequire(import.meta.url)("../package.json").version;
|
|
33610
33615
|
var subcommand = process.argv[2];
|
|
33611
33616
|
if (subcommand === "deploy-acl") {
|
|
33612
33617
|
const filePath = process.argv[3];
|
|
@@ -33638,7 +33643,8 @@ var toolGroups = {
|
|
|
33638
33643
|
services: serviceTools,
|
|
33639
33644
|
"log-streaming": logStreamingTools
|
|
33640
33645
|
};
|
|
33641
|
-
|
|
33646
|
+
var localCliEnabled = isLocalCliEnabled(process.env);
|
|
33647
|
+
if (localCliEnabled) {
|
|
33642
33648
|
toolGroups["local-cli"] = localCliTools;
|
|
33643
33649
|
}
|
|
33644
33650
|
var {
|
|
@@ -33699,7 +33705,6 @@ var transport = new StdioServerTransport();
|
|
|
33699
33705
|
await server.connect(transport);
|
|
33700
33706
|
var readonlyMode = process.env.TAILSCALE_READONLY === "1" || process.env.TAILSCALE_READONLY === "true";
|
|
33701
33707
|
var profileApplied = process.env.TAILSCALE_PROFILE && !unknownProfile ? process.env.TAILSCALE_PROFILE : null;
|
|
33702
|
-
var localCliEnabled = process.env.TAILSCALE_LOCAL_CLI === "1" || process.env.TAILSCALE_LOCAL_CLI === "true";
|
|
33703
33708
|
var filterSuffix = [
|
|
33704
33709
|
profileApplied ? `profile=${profileApplied}` : null,
|
|
33705
33710
|
process.env.TAILSCALE_TOOLS ? `groups=${process.env.TAILSCALE_TOOLS}` : null,
|