tailscale-mcp 2026.3.15

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 (81) hide show
  1. package/.env.example +17 -0
  2. package/ARCHITECTURE.md +220 -0
  3. package/CHANGELOG.md +93 -0
  4. package/CLAUDE.md +180 -0
  5. package/COMMERCIAL_LICENSE.md +44 -0
  6. package/CONTRIBUTING.md +54 -0
  7. package/LICENSE +661 -0
  8. package/PRODUCT_PACKAGING.md +138 -0
  9. package/README.md +276 -0
  10. package/ROADMAP.md +67 -0
  11. package/SECURITY.md +24 -0
  12. package/dist/client/client-factory.d.ts +12 -0
  13. package/dist/client/client-factory.d.ts.map +1 -0
  14. package/dist/client/client-factory.js +31 -0
  15. package/dist/client/client-factory.js.map +1 -0
  16. package/dist/client/tailscale-client.d.ts +18 -0
  17. package/dist/client/tailscale-client.d.ts.map +1 -0
  18. package/dist/client/tailscale-client.js +101 -0
  19. package/dist/client/tailscale-client.js.map +1 -0
  20. package/dist/client/tailscale-oauth-client.d.ts +19 -0
  21. package/dist/client/tailscale-oauth-client.d.ts.map +1 -0
  22. package/dist/client/tailscale-oauth-client.js +119 -0
  23. package/dist/client/tailscale-oauth-client.js.map +1 -0
  24. package/dist/client/types.d.ts +281 -0
  25. package/dist/client/types.d.ts.map +1 -0
  26. package/dist/client/types.js +3 -0
  27. package/dist/client/types.js.map +1 -0
  28. package/dist/index.d.ts +2 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +100 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/tools/acl.d.ts +80 -0
  33. package/dist/tools/acl.d.ts.map +1 -0
  34. package/dist/tools/acl.js +180 -0
  35. package/dist/tools/acl.js.map +1 -0
  36. package/dist/tools/devices.d.ts +162 -0
  37. package/dist/tools/devices.d.ts.map +1 -0
  38. package/dist/tools/devices.js +347 -0
  39. package/dist/tools/devices.js.map +1 -0
  40. package/dist/tools/diagnostics.d.ts +65 -0
  41. package/dist/tools/diagnostics.d.ts.map +1 -0
  42. package/dist/tools/diagnostics.js +178 -0
  43. package/dist/tools/diagnostics.js.map +1 -0
  44. package/dist/tools/dns.d.ts +98 -0
  45. package/dist/tools/dns.d.ts.map +1 -0
  46. package/dist/tools/dns.js +179 -0
  47. package/dist/tools/dns.js.map +1 -0
  48. package/dist/tools/keys.d.ts +107 -0
  49. package/dist/tools/keys.d.ts.map +1 -0
  50. package/dist/tools/keys.js +167 -0
  51. package/dist/tools/keys.js.map +1 -0
  52. package/dist/tools/posture.d.ts +98 -0
  53. package/dist/tools/posture.d.ts.map +1 -0
  54. package/dist/tools/posture.js +155 -0
  55. package/dist/tools/posture.js.map +1 -0
  56. package/dist/tools/tailnet.d.ts +132 -0
  57. package/dist/tools/tailnet.d.ts.map +1 -0
  58. package/dist/tools/tailnet.js +222 -0
  59. package/dist/tools/tailnet.js.map +1 -0
  60. package/dist/tools/users.d.ts +44 -0
  61. package/dist/tools/users.d.ts.map +1 -0
  62. package/dist/tools/users.js +90 -0
  63. package/dist/tools/users.js.map +1 -0
  64. package/dist/tools/webhooks.d.ts +88 -0
  65. package/dist/tools/webhooks.d.ts.map +1 -0
  66. package/dist/tools/webhooks.js +168 -0
  67. package/dist/tools/webhooks.js.map +1 -0
  68. package/dist/transport.d.ts +13 -0
  69. package/dist/transport.d.ts.map +1 -0
  70. package/dist/transport.js +42 -0
  71. package/dist/transport.js.map +1 -0
  72. package/dist/utils/errors.d.ts +8 -0
  73. package/dist/utils/errors.d.ts.map +1 -0
  74. package/dist/utils/errors.js +42 -0
  75. package/dist/utils/errors.js.map +1 -0
  76. package/dist/utils/validation.d.ts +18 -0
  77. package/dist/utils/validation.d.ts.map +1 -0
  78. package/dist/utils/validation.js +35 -0
  79. package/dist/utils/validation.js.map +1 -0
  80. package/package.json +55 -0
  81. package/vitest.config.ts +8 -0
@@ -0,0 +1,155 @@
1
+ import { z } from "zod";
2
+ // ---------------------------------------------------------------------------
3
+ // Constants
4
+ // ---------------------------------------------------------------------------
5
+ const POSTURE_PROVIDERS = [
6
+ "crowdstrike", "falcon", "intune", "jamfPro",
7
+ "kandji", "kolide", "sentinelone",
8
+ ];
9
+ // ---------------------------------------------------------------------------
10
+ // Zod schemas for input validation
11
+ // ---------------------------------------------------------------------------
12
+ const PostureIntegrationListSchema = z.object({});
13
+ const PostureIntegrationGetSchema = z.object({
14
+ integrationId: z.string().min(1, "Integration ID is required"),
15
+ });
16
+ const PostureIntegrationCreateSchema = z.object({
17
+ provider: z.enum(POSTURE_PROVIDERS),
18
+ cloudId: z.string().optional(),
19
+ clientId: z.string().optional(),
20
+ clientSecret: z.string().optional(),
21
+ tenantId: z.string().optional(),
22
+ });
23
+ const PostureIntegrationDeleteSchema = z.object({
24
+ integrationId: z.string().min(1, "Integration ID is required"),
25
+ confirm: z.literal(true, {
26
+ errorMap: () => ({ message: "confirm must be true to delete a posture integration" }),
27
+ }),
28
+ });
29
+ // ---------------------------------------------------------------------------
30
+ // Tool definitions (for ListTools)
31
+ // ---------------------------------------------------------------------------
32
+ export const postureToolDefinitions = [
33
+ {
34
+ name: "tailscale_posture_integration_list",
35
+ description: "List all configured third-party posture provider integrations for the tailnet (e.g., CrowdStrike, Intune, Jamf).",
36
+ inputSchema: {
37
+ type: "object",
38
+ properties: {},
39
+ },
40
+ },
41
+ {
42
+ name: "tailscale_posture_integration_get",
43
+ description: "Get details for a specific posture provider integration by ID.",
44
+ inputSchema: {
45
+ type: "object",
46
+ properties: {
47
+ integrationId: {
48
+ type: "string",
49
+ description: "The posture integration ID",
50
+ },
51
+ },
52
+ required: ["integrationId"],
53
+ },
54
+ },
55
+ {
56
+ name: "tailscale_posture_integration_create",
57
+ description: "Create a new third-party posture provider integration. Supported providers: crowdstrike, falcon, intune, jamfPro, kandji, kolide, sentinelone. Required fields depend on the provider.",
58
+ inputSchema: {
59
+ type: "object",
60
+ properties: {
61
+ provider: {
62
+ type: "string",
63
+ enum: ["crowdstrike", "falcon", "intune", "jamfPro", "kandji", "kolide", "sentinelone"],
64
+ description: "Posture provider type",
65
+ },
66
+ cloudId: {
67
+ type: "string",
68
+ description: "Cloud ID (provider-specific)",
69
+ },
70
+ clientId: {
71
+ type: "string",
72
+ description: "Client ID for the posture provider",
73
+ },
74
+ clientSecret: {
75
+ type: "string",
76
+ description: "Client secret for the posture provider",
77
+ },
78
+ tenantId: {
79
+ type: "string",
80
+ description: "Tenant ID (for Intune/Azure-based providers)",
81
+ },
82
+ },
83
+ required: ["provider"],
84
+ },
85
+ },
86
+ {
87
+ name: "tailscale_posture_integration_delete",
88
+ description: "Delete a posture provider integration. Requires confirm: true.",
89
+ inputSchema: {
90
+ type: "object",
91
+ properties: {
92
+ integrationId: {
93
+ type: "string",
94
+ description: "The posture integration ID to delete",
95
+ },
96
+ confirm: {
97
+ type: "boolean",
98
+ description: "Must be true to confirm deletion",
99
+ },
100
+ },
101
+ required: ["integrationId", "confirm"],
102
+ },
103
+ },
104
+ ];
105
+ // ---------------------------------------------------------------------------
106
+ // Tool handler
107
+ // ---------------------------------------------------------------------------
108
+ export async function handlePostureTool(name, args, client) {
109
+ try {
110
+ switch (name) {
111
+ case "tailscale_posture_integration_list": {
112
+ PostureIntegrationListSchema.parse(args);
113
+ const result = await client.get(`/tailnet/${client.tailnet}/posture/integrations`);
114
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
115
+ }
116
+ case "tailscale_posture_integration_get": {
117
+ const parsed = PostureIntegrationGetSchema.parse(args);
118
+ const result = await client.get(`/tailnet/${client.tailnet}/posture/integrations/${parsed.integrationId}`);
119
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
120
+ }
121
+ case "tailscale_posture_integration_create": {
122
+ const parsed = PostureIntegrationCreateSchema.parse(args);
123
+ const body = { provider: parsed.provider };
124
+ if (parsed.cloudId !== undefined)
125
+ body["cloudId"] = parsed.cloudId;
126
+ if (parsed.clientId !== undefined)
127
+ body["clientId"] = parsed.clientId;
128
+ if (parsed.clientSecret !== undefined)
129
+ body["clientSecret"] = parsed.clientSecret;
130
+ if (parsed.tenantId !== undefined)
131
+ body["tenantId"] = parsed.tenantId;
132
+ const result = await client.post(`/tailnet/${client.tailnet}/posture/integrations`, body);
133
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
134
+ }
135
+ case "tailscale_posture_integration_delete": {
136
+ const parsed = PostureIntegrationDeleteSchema.parse(args);
137
+ await client.deleteVoid(`/tailnet/${client.tailnet}/posture/integrations/${parsed.integrationId}`);
138
+ return {
139
+ content: [{ type: "text", text: JSON.stringify({ deleted: true, integrationId: parsed.integrationId }, null, 2) }],
140
+ };
141
+ }
142
+ default:
143
+ return {
144
+ content: [{ type: "text", text: `Unknown posture tool: ${name}` }],
145
+ };
146
+ }
147
+ }
148
+ catch (error) {
149
+ const message = error instanceof Error ? error.message : "Unknown error";
150
+ return {
151
+ content: [{ type: "text", text: `Error executing ${name}: ${message}` }],
152
+ };
153
+ }
154
+ }
155
+ //# sourceMappingURL=posture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"posture.js","sourceRoot":"","sources":["../../src/tools/posture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,iBAAiB,GAAG;IACxB,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS;IAC5C,QAAQ,EAAE,QAAQ,EAAE,aAAa;CACzB,CAAC;AAEX,8EAA8E;AAC9E,mCAAmC;AACnC,8EAA8E;AAE9E,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAElD,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,4BAA4B,CAAC;CAC/D,CAAC,CAAC;AAEH,MAAM,8BAA8B,GAAG,CAAC,CAAC,M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netToolDefinitions: ({
3
+ name: string;
4
+ description: string;
5
+ inputSchema: {
6
+ type: "object";
7
+ properties: {
8
+ account?: undefined;
9
+ support?: undefined;
10
+ security?: undefined;
11
+ confirm?: undefined;
12
+ devicesApprovalOn?: undefined;
13
+ devicesAutoUpdatesOn?: undefined;
14
+ devicesKeyDurationDays?: undefined;
15
+ usersApprovalOn?: undefined;
16
+ usersRoleAllowedToJoinExternalTailnets?: undefined;
17
+ networkFlowLoggingOn?: undefined;
18
+ regionalRoutingOn?: undefined;
19
+ postureIdentityCollectionOn?: undefined;
20
+ };
21
+ required?: undefined;
22
+ };
23
+ } | {
24
+ name: string;
25
+ description: string;
26
+ inputSchema: {
27
+ type: "object";
28
+ properties: {
29
+ account: {
30
+ type: string;
31
+ properties: {
32
+ email: {
33
+ type: string;
34
+ description: string;
35
+ };
36
+ };
37
+ required: string[];
38
+ description: string;
39
+ };
40
+ support: {
41
+ type: string;
42
+ properties: {
43
+ email: {
44
+ type: string;
45
+ description: string;
46
+ };
47
+ };
48
+ required: string[];
49
+ description: string;
50
+ };
51
+ security: {
52
+ type: string;
53
+ properties: {
54
+ email: {
55
+ type: string;
56
+ description: string;
57
+ };
58
+ };
59
+ required: string[];
60
+ description: string;
61
+ };
62
+ confirm: {
63
+ type: string;
64
+ description: string;
65
+ };
66
+ devicesApprovalOn?: undefined;
67
+ devicesAutoUpdatesOn?: undefined;
68
+ devicesKeyDurationDays?: undefined;
69
+ usersApprovalOn?: undefined;
70
+ usersRoleAllowedToJoinExternalTailnets?: undefined;
71
+ networkFlowLoggingOn?: undefined;
72
+ regionalRoutingOn?: undefined;
73
+ postureIdentityCollectionOn?: undefined;
74
+ };
75
+ required: string[];
76
+ };
77
+ } | {
78
+ name: string;
79
+ description: string;
80
+ inputSchema: {
81
+ type: "object";
82
+ properties: {
83
+ devicesApprovalOn: {
84
+ type: string;
85
+ description: string;
86
+ };
87
+ devicesAutoUpdatesOn: {
88
+ type: string;
89
+ description: string;
90
+ };
91
+ devicesKeyDurationDays: {
92
+ type: string;
93
+ description: string;
94
+ };
95
+ usersApprovalOn: {
96
+ type: string;
97
+ description: string;
98
+ };
99
+ usersRoleAllowedToJoinExternalTailnets: {
100
+ type: string;
101
+ description: string;
102
+ };
103
+ networkFlowLoggingOn: {
104
+ type: string;
105
+ description: string;
106
+ };
107
+ regionalRoutingOn: {
108
+ type: string;
109
+ description: string;
110
+ };
111
+ postureIdentityCollectionOn: {
112
+ type: string;
113
+ description: string;
114
+ };
115
+ confirm: {
116
+ type: string;
117
+ description: string;
118
+ };
119
+ account?: undefined;
120
+ support?: undefined;
121
+ security?: undefined;
122
+ };
123
+ required: string[];
124
+ };
125
+ })[];
126
+ export declare function handleTailnetTool(name: string, args: Record<string, unknown>, client: ITailscaleClient): Promise<{
127
+ content: Array<{
128
+ type: "text";
129
+ text: string;
130
+ }>;
131
+ }>;
132
+ //# sourceMappingURL=tailnet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailnet.d.ts","sourceRoot":"","sources":["../../src/tools/tailnet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAwD3D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkHlC,CAAC;AAMF,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAqE7D"}
@@ -0,0 +1,222 @@
1
+ import { z } from "zod";
2
+ // ---------------------------------------------------------------------------
3
+ // Zod schemas for input validation
4
+ // ---------------------------------------------------------------------------
5
+ const TailnetSettingsGetSchema = z.object({});
6
+ const TailnetContactsGetSchema = z.object({});
7
+ const TailnetContactsSetSchema = z.object({
8
+ account: z
9
+ .object({
10
+ email: z.string().email("Invalid account email"),
11
+ })
12
+ .optional(),
13
+ support: z
14
+ .object({
15
+ email: z.string().email("Invalid support email"),
16
+ })
17
+ .optional(),
18
+ security: z
19
+ .object({
20
+ email: z.string().email("Invalid security email"),
21
+ })
22
+ .optional(),
23
+ confirm: z.literal(true, {
24
+ errorMap: () => ({ message: "confirm must be true to update tailnet contacts" }),
25
+ }),
26
+ });
27
+ const TailnetLockStatusSchema = z.object({});
28
+ const TailnetSettingsUpdateSchema = z.object({
29
+ devicesApprovalOn: z.boolean().optional(),
30
+ devicesAutoUpdatesOn: z.boolean().optional(),
31
+ devicesKeyDurationDays: z.number().int().positive().optional(),
32
+ usersApprovalOn: z.boolean().optional(),
33
+ usersRoleAllowedToJoinExternalTailnets: z.string().optional(),
34
+ networkFlowLoggingOn: z.boolean().optional(),
35
+ regionalRoutingOn: z.boolean().optional(),
36
+ postureIdentityCollectionOn: z.boolean().optional(),
37
+ confirm: z.literal(true, {
38
+ errorMap: () => ({ message: "confirm must be true to update tailnet settings" }),
39
+ }),
40
+ });
41
+ // ---------------------------------------------------------------------------
42
+ // Tool definitions (for ListTools)
43
+ // ---------------------------------------------------------------------------
44
+ export const tailnetToolDefinitions = [
45
+ {
46
+ name: "tailscale_tailnet_settings_get",
47
+ description: "Get the tailnet settings including device approval, auto-updates, key expiry, and posture identity collection.",
48
+ inputSchema: {
49
+ type: "object",
50
+ properties: {},
51
+ },
52
+ },
53
+ {
54
+ name: "tailscale_tailnet_contacts_get",
55
+ description: "Get the contact email addresses configured for the tailnet (account, support, and security contacts).",
56
+ inputSchema: {
57
+ type: "object",
58
+ properties: {},
59
+ },
60
+ },
61
+ {
62
+ name: "tailscale_tailnet_contacts_set",
63
+ description: "Update contact email addresses for the tailnet. Requires confirm: true. Provide any combination of account, support, or security contacts.",
64
+ inputSchema: {
65
+ type: "object",
66
+ properties: {
67
+ account: {
68
+ type: "object",
69
+ properties: {
70
+ email: { type: "string", description: "Account contact email address" },
71
+ },
72
+ required: ["email"],
73
+ description: "Account contact (billing, account management)",
74
+ },
75
+ support: {
76
+ type: "object",
77
+ properties: {
78
+ email: { type: "string", description: "Support contact email address" },
79
+ },
80
+ required: ["email"],
81
+ description: "Support contact",
82
+ },
83
+ security: {
84
+ type: "object",
85
+ properties: {
86
+ email: { type: "string", description: "Security contact email address" },
87
+ },
88
+ required: ["email"],
89
+ description: "Security contact for vulnerability reports",
90
+ },
91
+ confirm: {
92
+ type: "boolean",
93
+ description: "Must be true to confirm updating tailnet contacts",
94
+ },
95
+ },
96
+ required: ["confirm"],
97
+ },
98
+ },
99
+ {
100
+ name: "tailscale_tailnet_lock_status",
101
+ description: "Get the Tailnet Lock status. Tailnet Lock allows requiring cryptographic signatures on all node key registrations.",
102
+ inputSchema: {
103
+ type: "object",
104
+ properties: {},
105
+ },
106
+ },
107
+ {
108
+ name: "tailscale_tailnet_settings_update",
109
+ description: "Update tailnet settings. Requires confirm: true. All settings fields are optional — only provided fields will be updated.",
110
+ inputSchema: {
111
+ type: "object",
112
+ properties: {
113
+ devicesApprovalOn: {
114
+ type: "boolean",
115
+ description: "Whether devices require admin approval before they can join the tailnet",
116
+ },
117
+ devicesAutoUpdatesOn: {
118
+ type: "boolean",
119
+ description: "Whether devices are automatically updated",
120
+ },
121
+ devicesKeyDurationDays: {
122
+ type: "number",
123
+ description: "Number of days before device keys expire",
124
+ },
125
+ usersApprovalOn: {
126
+ type: "boolean",
127
+ description: "Whether users require admin approval to join the tailnet",
128
+ },
129
+ usersRoleAllowedToJoinExternalTailnets: {
130
+ type: "string",
131
+ description: "Role allowed to join external tailnets",
132
+ },
133
+ networkFlowLoggingOn: {
134
+ type: "boolean",
135
+ description: "Whether network flow logging is enabled",
136
+ },
137
+ regionalRoutingOn: {
138
+ type: "boolean",
139
+ description: "Whether regional routing is enabled",
140
+ },
141
+ postureIdentityCollectionOn: {
142
+ type: "boolean",
143
+ description: "Whether posture identity collection is enabled",
144
+ },
145
+ confirm: {
146
+ type: "boolean",
147
+ description: "Must be true to confirm updating tailnet settings",
148
+ },
149
+ },
150
+ required: ["confirm"],
151
+ },
152
+ },
153
+ ];
154
+ // ---------------------------------------------------------------------------
155
+ // Tool handler
156
+ // ---------------------------------------------------------------------------
157
+ export async function handleTailnetTool(name, args, client) {
158
+ try {
159
+ switch (name) {
160
+ case "tailscale_tailnet_settings_get": {
161
+ TailnetSettingsGetSchema.parse(args);
162
+ const result = await client.get(`/tailnet/${client.tailnet}/settings`);
163
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
164
+ }
165
+ case "tailscale_tailnet_contacts_get": {
166
+ TailnetContactsGetSchema.parse(args);
167
+ const result = await client.get(`/tailnet/${client.tailnet}/contacts`);
168
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
169
+ }
170
+ case "tailscale_tailnet_contacts_set": {
171
+ const parsed = TailnetContactsSetSchema.parse(args);
172
+ const body = {};
173
+ if (parsed.account !== undefined)
174
+ body["account"] = parsed.account;
175
+ if (parsed.support !== undefined)
176
+ body["support"] = parsed.support;
177
+ if (parsed.security !== undefined)
178
+ body["security"] = parsed.security;
179
+ const result = await client.patch(`/tailnet/${client.tailnet}/contacts`, body);
180
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
181
+ }
182
+ case "tailscale_tailnet_lock_status": {
183
+ TailnetLockStatusSchema.parse(args);
184
+ const result = await client.get(`/tailnet/${client.tailnet}/lock/status`);
185
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
186
+ }
187
+ case "tailscale_tailnet_settings_update": {
188
+ const parsed = TailnetSettingsUpdateSchema.parse(args);
189
+ const body = {};
190
+ if (parsed.devicesApprovalOn !== undefined)
191
+ body["devicesApprovalOn"] = parsed.devicesApprovalOn;
192
+ if (parsed.devicesAutoUpdatesOn !== undefined)
193
+ body["devicesAutoUpdatesOn"] = parsed.devicesAutoUpdatesOn;
194
+ if (parsed.devicesKeyDurationDays !== undefined)
195
+ body["devicesKeyDurationDays"] = parsed.devicesKeyDurationDays;
196
+ if (parsed.usersApprovalOn !== undefined)
197
+ body["usersApprovalOn"] = parsed.usersApprovalOn;
198
+ if (parsed.usersRoleAllowedToJoinExternalTailnets !== undefined)
199
+ body["usersRoleAllowedToJoinExternalTailnets"] = parsed.usersRoleAllowedToJoinExternalTailnets;
200
+ if (parsed.networkFlowLoggingOn !== undefined)
201
+ body["networkFlowLoggingOn"] = parsed.networkFlowLoggingOn;
202
+ if (parsed.regionalRoutingOn !== undefined)
203
+ body["regionalRoutingOn"] = parsed.regionalRoutingOn;
204
+ if (parsed.postureIdentityCollectionOn !== undefined)
205
+ body["postureIdentityCollectionOn"] = parsed.postureIdentityCollectionOn;
206
+ const result = await client.patch(`/tailnet/${client.tailnet}/settings`, body);
207
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
208
+ }
209
+ default:
210
+ return {
211
+ content: [{ type: "text", text: `Unknown tailnet tool: ${name}` }],
212
+ };
213
+ }
214
+ }
215
+ catch (error) {
216
+ const message = error instanceof Error ? error.message : "Unknown error";
217
+ return {
218
+ content: [{ type: "text", text: `Error executing ${name}: ${message}` }],
219
+ };
220
+ }
221
+ }
222
+ //# sourceMappingURL=tailnet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailnet.js","sourceRoot":"","sources":["../../src/tools/tailnet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,8EAA8E;AAC9E,mCAAmC;AACnC,8EAA8E;AAE9E,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAE9C,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC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AAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,IAAI,KAAK,OAAO,EAAE,EAAE,CAAC;SACzE,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { ITailscaleClient } from "../client/types.js";
2
+ export declare const userToolDefinitions: ({
3
+ name: string;
4
+ description: string;
5
+ inputSchema: {
6
+ type: "object";
7
+ properties: {
8
+ type: {
9
+ type: string;
10
+ enum: string[];
11
+ description: string;
12
+ };
13
+ role: {
14
+ type: string;
15
+ enum: string[];
16
+ description: string;
17
+ };
18
+ userId?: undefined;
19
+ };
20
+ required?: undefined;
21
+ };
22
+ } | {
23
+ name: string;
24
+ description: string;
25
+ inputSchema: {
26
+ type: "object";
27
+ properties: {
28
+ userId: {
29
+ type: string;
30
+ description: string;
31
+ };
32
+ type?: undefined;
33
+ role?: undefined;
34
+ };
35
+ required: string[];
36
+ };
37
+ })[];
38
+ export declare function handleUserTool(name: string, args: Record<string, unknown>, client: ITailscaleClient): Promise<{
39
+ content: Array<{
40
+ type: "text";
41
+ text: string;
42
+ }>;
43
+ }>;
44
+ //# sourceMappingURL=users.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/tools/users.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA0B3D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoC/B,CAAC;AAMF,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAkC7D"}