@yawlabs/tailscale-mcp 0.1.6 → 0.2.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/README.md +104 -14
- package/dist/api.js +2 -2
- package/dist/api.js.map +1 -1
- package/dist/index.js +59 -8
- package/dist/index.js.map +1 -1
- package/dist/tools/acl.d.ts +28 -0
- package/dist/tools/acl.js +33 -4
- package/dist/tools/acl.js.map +1 -1
- package/dist/tools/audit.d.ts +14 -0
- package/dist/tools/audit.js +19 -15
- package/dist/tools/audit.js.map +1 -1
- package/dist/tools/devices.d.ts +91 -0
- package/dist/tools/devices.js +102 -4
- package/dist/tools/devices.js.map +1 -1
- package/dist/tools/dns.d.ts +56 -0
- package/dist/tools/dns.js +57 -1
- package/dist/tools/dns.js.map +1 -1
- package/dist/tools/invites.d.ts +56 -0
- package/dist/tools/invites.js +59 -9
- package/dist/tools/invites.js.map +1 -1
- package/dist/tools/keys.d.ts +28 -0
- package/dist/tools/keys.js +29 -1
- package/dist/tools/keys.js.map +1 -1
- package/dist/tools/log-streaming.d.ts +90 -0
- package/dist/tools/log-streaming.js +89 -0
- package/dist/tools/log-streaming.js.map +1 -0
- package/dist/tools/network-lock.d.ts +7 -0
- package/dist/tools/network-lock.js +7 -0
- package/dist/tools/network-lock.js.map +1 -1
- package/dist/tools/oauth-clients.d.ts +118 -0
- package/dist/tools/oauth-clients.js +102 -0
- package/dist/tools/oauth-clients.js.map +1 -0
- package/dist/tools/posture.d.ts +35 -0
- package/dist/tools/posture.js +36 -1
- package/dist/tools/posture.js.map +1 -1
- package/dist/tools/services.d.ts +124 -0
- package/dist/tools/services.js +106 -0
- package/dist/tools/services.js.map +1 -0
- package/dist/tools/status.d.ts +7 -0
- package/dist/tools/status.js +7 -0
- package/dist/tools/status.js.map +1 -1
- package/dist/tools/tailnet.d.ts +28 -0
- package/dist/tools/tailnet.js +28 -0
- package/dist/tools/tailnet.js.map +1 -1
- package/dist/tools/users.d.ts +42 -0
- package/dist/tools/users.js +45 -2
- package/dist/tools/users.js.map +1 -1
- package/dist/tools/webhooks.d.ts +42 -0
- package/dist/tools/webhooks.js +43 -1
- package/dist/tools/webhooks.js.map +1 -1
- package/dist/tools/workload-identity.d.ts +118 -0
- package/dist/tools/workload-identity.js +105 -0
- package/dist/tools/workload-identity.js.map +1 -0
- package/package.json +6 -2
package/dist/tools/invites.d.ts
CHANGED
|
@@ -2,11 +2,25 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const inviteTools: readonly [{
|
|
3
3
|
readonly name: "tailscale_list_device_invites";
|
|
4
4
|
readonly description: "List all device invites for your tailnet.";
|
|
5
|
+
readonly annotations: {
|
|
6
|
+
readonly title: "List device invites";
|
|
7
|
+
readonly readOnlyHint: true;
|
|
8
|
+
readonly destructiveHint: false;
|
|
9
|
+
readonly idempotentHint: true;
|
|
10
|
+
readonly openWorldHint: true;
|
|
11
|
+
};
|
|
5
12
|
readonly inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
6
13
|
readonly handler: () => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
7
14
|
}, {
|
|
8
15
|
readonly name: "tailscale_create_device_invite";
|
|
9
16
|
readonly description: "Create a new device invite that allows someone to add a device to your tailnet.";
|
|
17
|
+
readonly annotations: {
|
|
18
|
+
readonly title: "Create device invite";
|
|
19
|
+
readonly readOnlyHint: false;
|
|
20
|
+
readonly destructiveHint: false;
|
|
21
|
+
readonly idempotentHint: false;
|
|
22
|
+
readonly openWorldHint: true;
|
|
23
|
+
};
|
|
10
24
|
readonly inputSchema: z.ZodObject<{
|
|
11
25
|
multiUse: z.ZodOptional<z.ZodBoolean>;
|
|
12
26
|
allowExitNode: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -28,6 +42,13 @@ export declare const inviteTools: readonly [{
|
|
|
28
42
|
}, {
|
|
29
43
|
readonly name: "tailscale_get_device_invite";
|
|
30
44
|
readonly description: "Get details for a specific device invite.";
|
|
45
|
+
readonly annotations: {
|
|
46
|
+
readonly title: "Get device invite";
|
|
47
|
+
readonly readOnlyHint: true;
|
|
48
|
+
readonly destructiveHint: false;
|
|
49
|
+
readonly idempotentHint: true;
|
|
50
|
+
readonly openWorldHint: true;
|
|
51
|
+
};
|
|
31
52
|
readonly inputSchema: z.ZodObject<{
|
|
32
53
|
inviteId: z.ZodString;
|
|
33
54
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -41,6 +62,13 @@ export declare const inviteTools: readonly [{
|
|
|
41
62
|
}, {
|
|
42
63
|
readonly name: "tailscale_delete_device_invite";
|
|
43
64
|
readonly description: "Delete a device invite. This is irreversible — the invite link will stop working.";
|
|
65
|
+
readonly annotations: {
|
|
66
|
+
readonly title: "Delete device invite";
|
|
67
|
+
readonly readOnlyHint: false;
|
|
68
|
+
readonly destructiveHint: true;
|
|
69
|
+
readonly idempotentHint: true;
|
|
70
|
+
readonly openWorldHint: true;
|
|
71
|
+
};
|
|
44
72
|
readonly inputSchema: z.ZodObject<{
|
|
45
73
|
inviteId: z.ZodString;
|
|
46
74
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -54,11 +82,25 @@ export declare const inviteTools: readonly [{
|
|
|
54
82
|
}, {
|
|
55
83
|
readonly name: "tailscale_list_user_invites";
|
|
56
84
|
readonly description: "List all user invites for your tailnet.";
|
|
85
|
+
readonly annotations: {
|
|
86
|
+
readonly title: "List user invites";
|
|
87
|
+
readonly readOnlyHint: true;
|
|
88
|
+
readonly destructiveHint: false;
|
|
89
|
+
readonly idempotentHint: true;
|
|
90
|
+
readonly openWorldHint: true;
|
|
91
|
+
};
|
|
57
92
|
readonly inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
58
93
|
readonly handler: () => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
59
94
|
}, {
|
|
60
95
|
readonly name: "tailscale_create_user_invite";
|
|
61
96
|
readonly description: "Create a new user invite that allows someone to join your tailnet.";
|
|
97
|
+
readonly annotations: {
|
|
98
|
+
readonly title: "Create user invite";
|
|
99
|
+
readonly readOnlyHint: false;
|
|
100
|
+
readonly destructiveHint: false;
|
|
101
|
+
readonly idempotentHint: false;
|
|
102
|
+
readonly openWorldHint: true;
|
|
103
|
+
};
|
|
62
104
|
readonly inputSchema: z.ZodObject<{
|
|
63
105
|
email: z.ZodOptional<z.ZodString>;
|
|
64
106
|
role: z.ZodOptional<z.ZodEnum<["member", "admin", "it-admin", "network-admin", "billing-admin", "auditor"]>>;
|
|
@@ -76,6 +118,13 @@ export declare const inviteTools: readonly [{
|
|
|
76
118
|
}, {
|
|
77
119
|
readonly name: "tailscale_get_user_invite";
|
|
78
120
|
readonly description: "Get details for a specific user invite.";
|
|
121
|
+
readonly annotations: {
|
|
122
|
+
readonly title: "Get user invite";
|
|
123
|
+
readonly readOnlyHint: true;
|
|
124
|
+
readonly destructiveHint: false;
|
|
125
|
+
readonly idempotentHint: true;
|
|
126
|
+
readonly openWorldHint: true;
|
|
127
|
+
};
|
|
79
128
|
readonly inputSchema: z.ZodObject<{
|
|
80
129
|
inviteId: z.ZodString;
|
|
81
130
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -89,6 +138,13 @@ export declare const inviteTools: readonly [{
|
|
|
89
138
|
}, {
|
|
90
139
|
readonly name: "tailscale_delete_user_invite";
|
|
91
140
|
readonly description: "Delete a user invite. This is irreversible — the invite link will stop working.";
|
|
141
|
+
readonly annotations: {
|
|
142
|
+
readonly title: "Delete user invite";
|
|
143
|
+
readonly readOnlyHint: false;
|
|
144
|
+
readonly destructiveHint: true;
|
|
145
|
+
readonly idempotentHint: true;
|
|
146
|
+
readonly openWorldHint: true;
|
|
147
|
+
};
|
|
92
148
|
readonly inputSchema: z.ZodObject<{
|
|
93
149
|
inviteId: z.ZodString;
|
|
94
150
|
}, "strip", z.ZodTypeAny, {
|
package/dist/tools/invites.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { apiGet, apiPost,
|
|
2
|
+
import { apiDelete, apiGet, apiPost, encPath, getTailnet } from "../api.js";
|
|
3
3
|
export const inviteTools = [
|
|
4
4
|
// --- Device Invites ---
|
|
5
5
|
{
|
|
6
6
|
name: "tailscale_list_device_invites",
|
|
7
7
|
description: "List all device invites for your tailnet.",
|
|
8
|
+
annotations: {
|
|
9
|
+
title: "List device invites",
|
|
10
|
+
readOnlyHint: true,
|
|
11
|
+
destructiveHint: false,
|
|
12
|
+
idempotentHint: true,
|
|
13
|
+
openWorldHint: true,
|
|
14
|
+
},
|
|
8
15
|
inputSchema: z.object({}),
|
|
9
16
|
handler: async () => {
|
|
10
17
|
return apiGet(`/tailnet/${getTailnet()}/device-invites`);
|
|
@@ -13,16 +20,20 @@ export const inviteTools = [
|
|
|
13
20
|
{
|
|
14
21
|
name: "tailscale_create_device_invite",
|
|
15
22
|
description: "Create a new device invite that allows someone to add a device to your tailnet.",
|
|
23
|
+
annotations: {
|
|
24
|
+
title: "Create device invite",
|
|
25
|
+
readOnlyHint: false,
|
|
26
|
+
destructiveHint: false,
|
|
27
|
+
idempotentHint: false,
|
|
28
|
+
openWorldHint: true,
|
|
29
|
+
},
|
|
16
30
|
inputSchema: z.object({
|
|
17
31
|
multiUse: z.boolean().optional().describe("Whether the invite can be used more than once (default: false)"),
|
|
18
32
|
allowExitNode: z
|
|
19
33
|
.boolean()
|
|
20
34
|
.optional()
|
|
21
35
|
.describe("Whether the invited device can be used as an exit node (default: false)"),
|
|
22
|
-
email: z
|
|
23
|
-
.string()
|
|
24
|
-
.optional()
|
|
25
|
-
.describe("Email address to send the invite to"),
|
|
36
|
+
email: z.string().optional().describe("Email address to send the invite to"),
|
|
26
37
|
}),
|
|
27
38
|
handler: async (input) => {
|
|
28
39
|
const body = {};
|
|
@@ -38,6 +49,13 @@ export const inviteTools = [
|
|
|
38
49
|
{
|
|
39
50
|
name: "tailscale_get_device_invite",
|
|
40
51
|
description: "Get details for a specific device invite.",
|
|
52
|
+
annotations: {
|
|
53
|
+
title: "Get device invite",
|
|
54
|
+
readOnlyHint: true,
|
|
55
|
+
destructiveHint: false,
|
|
56
|
+
idempotentHint: true,
|
|
57
|
+
openWorldHint: true,
|
|
58
|
+
},
|
|
41
59
|
inputSchema: z.object({
|
|
42
60
|
inviteId: z.string().describe("The device invite ID"),
|
|
43
61
|
}),
|
|
@@ -48,6 +66,13 @@ export const inviteTools = [
|
|
|
48
66
|
{
|
|
49
67
|
name: "tailscale_delete_device_invite",
|
|
50
68
|
description: "Delete a device invite. This is irreversible — the invite link will stop working.",
|
|
69
|
+
annotations: {
|
|
70
|
+
title: "Delete device invite",
|
|
71
|
+
readOnlyHint: false,
|
|
72
|
+
destructiveHint: true,
|
|
73
|
+
idempotentHint: true,
|
|
74
|
+
openWorldHint: true,
|
|
75
|
+
},
|
|
51
76
|
inputSchema: z.object({
|
|
52
77
|
inviteId: z.string().describe("The device invite ID to delete"),
|
|
53
78
|
}),
|
|
@@ -59,6 +84,13 @@ export const inviteTools = [
|
|
|
59
84
|
{
|
|
60
85
|
name: "tailscale_list_user_invites",
|
|
61
86
|
description: "List all user invites for your tailnet.",
|
|
87
|
+
annotations: {
|
|
88
|
+
title: "List user invites",
|
|
89
|
+
readOnlyHint: true,
|
|
90
|
+
destructiveHint: false,
|
|
91
|
+
idempotentHint: true,
|
|
92
|
+
openWorldHint: true,
|
|
93
|
+
},
|
|
62
94
|
inputSchema: z.object({}),
|
|
63
95
|
handler: async () => {
|
|
64
96
|
return apiGet(`/tailnet/${getTailnet()}/user-invites`);
|
|
@@ -67,11 +99,15 @@ export const inviteTools = [
|
|
|
67
99
|
{
|
|
68
100
|
name: "tailscale_create_user_invite",
|
|
69
101
|
description: "Create a new user invite that allows someone to join your tailnet.",
|
|
102
|
+
annotations: {
|
|
103
|
+
title: "Create user invite",
|
|
104
|
+
readOnlyHint: false,
|
|
105
|
+
destructiveHint: false,
|
|
106
|
+
idempotentHint: false,
|
|
107
|
+
openWorldHint: true,
|
|
108
|
+
},
|
|
70
109
|
inputSchema: z.object({
|
|
71
|
-
email: z
|
|
72
|
-
.string()
|
|
73
|
-
.optional()
|
|
74
|
-
.describe("Email address to send the invite to"),
|
|
110
|
+
email: z.string().optional().describe("Email address to send the invite to"),
|
|
75
111
|
role: z
|
|
76
112
|
.enum(["member", "admin", "it-admin", "network-admin", "billing-admin", "auditor"])
|
|
77
113
|
.optional()
|
|
@@ -89,6 +125,13 @@ export const inviteTools = [
|
|
|
89
125
|
{
|
|
90
126
|
name: "tailscale_get_user_invite",
|
|
91
127
|
description: "Get details for a specific user invite.",
|
|
128
|
+
annotations: {
|
|
129
|
+
title: "Get user invite",
|
|
130
|
+
readOnlyHint: true,
|
|
131
|
+
destructiveHint: false,
|
|
132
|
+
idempotentHint: true,
|
|
133
|
+
openWorldHint: true,
|
|
134
|
+
},
|
|
92
135
|
inputSchema: z.object({
|
|
93
136
|
inviteId: z.string().describe("The user invite ID"),
|
|
94
137
|
}),
|
|
@@ -99,6 +142,13 @@ export const inviteTools = [
|
|
|
99
142
|
{
|
|
100
143
|
name: "tailscale_delete_user_invite",
|
|
101
144
|
description: "Delete a user invite. This is irreversible — the invite link will stop working.",
|
|
145
|
+
annotations: {
|
|
146
|
+
title: "Delete user invite",
|
|
147
|
+
readOnlyHint: false,
|
|
148
|
+
destructiveHint: true,
|
|
149
|
+
idempotentHint: true,
|
|
150
|
+
openWorldHint: true,
|
|
151
|
+
},
|
|
102
152
|
inputSchema: z.object({
|
|
103
153
|
inviteId: z.string().describe("The user invite ID to delete"),
|
|
104
154
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invites.js","sourceRoot":"","sources":["../../src/tools/invites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"invites.js","sourceRoot":"","sources":["../../src/tools/invites.ts"],"names":[],"mappings":"AAAA,O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[{
|
|
3
3
|
readonly name: "tailscale_list_keys";
|
|
4
4
|
readonly description: "List all auth keys in your tailnet.";
|
|
5
|
+
readonly annotations: {
|
|
6
|
+
readonly title: "List auth keys";
|
|
7
|
+
readonly readOnlyHint: true;
|
|
8
|
+
readonly destructiveHint: false;
|
|
9
|
+
readonly idempotentHint: true;
|
|
10
|
+
readonly openWorldHint: true;
|
|
11
|
+
};
|
|
5
12
|
readonly inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
6
13
|
readonly handler: () => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
7
14
|
}, {
|
|
8
15
|
readonly name: "tailscale_get_key";
|
|
9
16
|
readonly description: "Get details for a specific auth key.";
|
|
17
|
+
readonly annotations: {
|
|
18
|
+
readonly title: "Get auth key";
|
|
19
|
+
readonly readOnlyHint: true;
|
|
20
|
+
readonly destructiveHint: false;
|
|
21
|
+
readonly idempotentHint: true;
|
|
22
|
+
readonly openWorldHint: true;
|
|
23
|
+
};
|
|
10
24
|
readonly inputSchema: z.ZodObject<{
|
|
11
25
|
keyId: z.ZodString;
|
|
12
26
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -20,6 +34,13 @@ export declare const keyTools: readonly [{
|
|
|
20
34
|
}, {
|
|
21
35
|
readonly name: "tailscale_create_key";
|
|
22
36
|
readonly description: "Create a new auth key for adding devices to your tailnet. Returns the key value — save it immediately, as it cannot be retrieved again.";
|
|
37
|
+
readonly annotations: {
|
|
38
|
+
readonly title: "Create auth key";
|
|
39
|
+
readonly readOnlyHint: false;
|
|
40
|
+
readonly destructiveHint: false;
|
|
41
|
+
readonly idempotentHint: false;
|
|
42
|
+
readonly openWorldHint: true;
|
|
43
|
+
};
|
|
23
44
|
readonly inputSchema: z.ZodObject<{
|
|
24
45
|
reusable: z.ZodOptional<z.ZodBoolean>;
|
|
25
46
|
ephemeral: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -53,6 +74,13 @@ export declare const keyTools: readonly [{
|
|
|
53
74
|
}, {
|
|
54
75
|
readonly name: "tailscale_delete_key";
|
|
55
76
|
readonly description: "Delete an auth key. This is irreversible — devices already authenticated with this key are unaffected, but no new devices can use it.";
|
|
77
|
+
readonly annotations: {
|
|
78
|
+
readonly title: "Delete auth key";
|
|
79
|
+
readonly readOnlyHint: false;
|
|
80
|
+
readonly destructiveHint: true;
|
|
81
|
+
readonly idempotentHint: true;
|
|
82
|
+
readonly openWorldHint: true;
|
|
83
|
+
};
|
|
56
84
|
readonly inputSchema: z.ZodObject<{
|
|
57
85
|
keyId: z.ZodString;
|
|
58
86
|
}, "strip", z.ZodTypeAny, {
|
package/dist/tools/keys.js
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { apiGet, apiPost,
|
|
2
|
+
import { apiDelete, apiGet, apiPost, encPath, getTailnet } from "../api.js";
|
|
3
3
|
export const keyTools = [
|
|
4
4
|
{
|
|
5
5
|
name: "tailscale_list_keys",
|
|
6
6
|
description: "List all auth keys in your tailnet.",
|
|
7
|
+
annotations: {
|
|
8
|
+
title: "List auth keys",
|
|
9
|
+
readOnlyHint: true,
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
idempotentHint: true,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
},
|
|
7
14
|
inputSchema: z.object({}),
|
|
8
15
|
handler: async () => {
|
|
9
16
|
return apiGet(`/tailnet/${getTailnet()}/keys`);
|
|
@@ -12,6 +19,13 @@ export const keyTools = [
|
|
|
12
19
|
{
|
|
13
20
|
name: "tailscale_get_key",
|
|
14
21
|
description: "Get details for a specific auth key.",
|
|
22
|
+
annotations: {
|
|
23
|
+
title: "Get auth key",
|
|
24
|
+
readOnlyHint: true,
|
|
25
|
+
destructiveHint: false,
|
|
26
|
+
idempotentHint: true,
|
|
27
|
+
openWorldHint: true,
|
|
28
|
+
},
|
|
15
29
|
inputSchema: z.object({
|
|
16
30
|
keyId: z.string().describe("The auth key ID"),
|
|
17
31
|
}),
|
|
@@ -22,6 +36,13 @@ export const keyTools = [
|
|
|
22
36
|
{
|
|
23
37
|
name: "tailscale_create_key",
|
|
24
38
|
description: "Create a new auth key for adding devices to your tailnet. Returns the key value — save it immediately, as it cannot be retrieved again.",
|
|
39
|
+
annotations: {
|
|
40
|
+
title: "Create auth key",
|
|
41
|
+
readOnlyHint: false,
|
|
42
|
+
destructiveHint: false,
|
|
43
|
+
idempotentHint: false,
|
|
44
|
+
openWorldHint: true,
|
|
45
|
+
},
|
|
25
46
|
inputSchema: z.object({
|
|
26
47
|
reusable: z.boolean().optional().describe("Whether the key can be used more than once (default: false)"),
|
|
27
48
|
ephemeral: z.boolean().optional().describe("Whether devices using this key are ephemeral (default: false)"),
|
|
@@ -53,6 +74,13 @@ export const keyTools = [
|
|
|
53
74
|
{
|
|
54
75
|
name: "tailscale_delete_key",
|
|
55
76
|
description: "Delete an auth key. This is irreversible — devices already authenticated with this key are unaffected, but no new devices can use it.",
|
|
77
|
+
annotations: {
|
|
78
|
+
title: "Delete auth key",
|
|
79
|
+
readOnlyHint: false,
|
|
80
|
+
destructiveHint: true,
|
|
81
|
+
idempotentHint: true,
|
|
82
|
+
openWorldHint: true,
|
|
83
|
+
},
|
|
56
84
|
inputSchema: z.object({
|
|
57
85
|
keyId: z.string().describe("The auth key ID to delete"),
|
|
58
86
|
}),
|
package/dist/tools/keys.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../src/tools/keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../src/tools/keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,O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,EAAE,sBAAsB;QAC5B,WAAW,EACT,uIAAuI;QACzI,WAAW,EAAE;YACX,KAAK,EAAE,iBAAiB;YACxB,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,IAAI;YACrB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;QACD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;SACxD,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,KAAwB,EAAE,EAAE;YAC1C,OAAO,SAAS,CAAC,YAAY,UAAU,EAAE,SAAS,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC5E,CAAC;KACF;CACO,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const logStreamingTools: readonly [{
|
|
3
|
+
readonly name: "tailscale_list_log_stream_configs";
|
|
4
|
+
readonly description: "List all log streaming configurations for your tailnet. Log streaming sends logs to external destinations like Axiom, Datadog, Splunk, Elasticsearch, S3, or GCS.";
|
|
5
|
+
readonly annotations: {
|
|
6
|
+
readonly title: "List log stream configs";
|
|
7
|
+
readonly readOnlyHint: true;
|
|
8
|
+
readonly destructiveHint: false;
|
|
9
|
+
readonly idempotentHint: true;
|
|
10
|
+
readonly openWorldHint: true;
|
|
11
|
+
};
|
|
12
|
+
readonly inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
13
|
+
readonly handler: () => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
14
|
+
}, {
|
|
15
|
+
readonly name: "tailscale_get_log_stream_config";
|
|
16
|
+
readonly description: "Get the log streaming configuration for a specific log type.";
|
|
17
|
+
readonly annotations: {
|
|
18
|
+
readonly title: "Get log stream config";
|
|
19
|
+
readonly readOnlyHint: true;
|
|
20
|
+
readonly destructiveHint: false;
|
|
21
|
+
readonly idempotentHint: true;
|
|
22
|
+
readonly openWorldHint: true;
|
|
23
|
+
};
|
|
24
|
+
readonly inputSchema: z.ZodObject<{
|
|
25
|
+
logType: z.ZodEnum<["configuration", "network"]>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
logType: "configuration" | "network";
|
|
28
|
+
}, {
|
|
29
|
+
logType: "configuration" | "network";
|
|
30
|
+
}>;
|
|
31
|
+
readonly handler: (input: {
|
|
32
|
+
logType: string;
|
|
33
|
+
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "tailscale_set_log_stream_config";
|
|
36
|
+
readonly description: "Set the log streaming configuration for a specific log type. Configures where logs are sent (e.g. Axiom, Datadog, Splunk, Elasticsearch, S3, GCS).";
|
|
37
|
+
readonly annotations: {
|
|
38
|
+
readonly title: "Set log stream config";
|
|
39
|
+
readonly readOnlyHint: false;
|
|
40
|
+
readonly destructiveHint: false;
|
|
41
|
+
readonly idempotentHint: true;
|
|
42
|
+
readonly openWorldHint: true;
|
|
43
|
+
};
|
|
44
|
+
readonly inputSchema: z.ZodObject<{
|
|
45
|
+
logType: z.ZodEnum<["configuration", "network"]>;
|
|
46
|
+
destinationType: z.ZodString;
|
|
47
|
+
url: z.ZodOptional<z.ZodString>;
|
|
48
|
+
token: z.ZodOptional<z.ZodString>;
|
|
49
|
+
user: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
logType: "configuration" | "network";
|
|
52
|
+
destinationType: string;
|
|
53
|
+
url?: string | undefined;
|
|
54
|
+
user?: string | undefined;
|
|
55
|
+
token?: string | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
logType: "configuration" | "network";
|
|
58
|
+
destinationType: string;
|
|
59
|
+
url?: string | undefined;
|
|
60
|
+
user?: string | undefined;
|
|
61
|
+
token?: string | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
readonly handler: (input: {
|
|
64
|
+
logType: string;
|
|
65
|
+
destinationType: string;
|
|
66
|
+
url?: string;
|
|
67
|
+
token?: string;
|
|
68
|
+
user?: string;
|
|
69
|
+
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
70
|
+
}, {
|
|
71
|
+
readonly name: "tailscale_delete_log_stream_config";
|
|
72
|
+
readonly description: "Delete a log streaming configuration. Logs will stop being sent to the configured destination.";
|
|
73
|
+
readonly annotations: {
|
|
74
|
+
readonly title: "Delete log stream config";
|
|
75
|
+
readonly readOnlyHint: false;
|
|
76
|
+
readonly destructiveHint: true;
|
|
77
|
+
readonly idempotentHint: true;
|
|
78
|
+
readonly openWorldHint: true;
|
|
79
|
+
};
|
|
80
|
+
readonly inputSchema: z.ZodObject<{
|
|
81
|
+
logType: z.ZodEnum<["configuration", "network"]>;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
logType: "configuration" | "network";
|
|
84
|
+
}, {
|
|
85
|
+
logType: "configuration" | "network";
|
|
86
|
+
}>;
|
|
87
|
+
readonly handler: (input: {
|
|
88
|
+
logType: string;
|
|
89
|
+
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
90
|
+
}];
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { apiDelete, apiGet, apiPut, encPath, getTailnet } from "../api.js";
|
|
3
|
+
export const logStreamingTools = [
|
|
4
|
+
{
|
|
5
|
+
name: "tailscale_list_log_stream_configs",
|
|
6
|
+
description: "List all log streaming configurations for your tailnet. Log streaming sends logs to external destinations like Axiom, Datadog, Splunk, Elasticsearch, S3, or GCS.",
|
|
7
|
+
annotations: {
|
|
8
|
+
title: "List log stream configs",
|
|
9
|
+
readOnlyHint: true,
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
idempotentHint: true,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
},
|
|
14
|
+
inputSchema: z.object({}),
|
|
15
|
+
handler: async () => {
|
|
16
|
+
return apiGet(`/tailnet/${getTailnet()}/logging/stream`);
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "tailscale_get_log_stream_config",
|
|
21
|
+
description: "Get the log streaming configuration for a specific log type.",
|
|
22
|
+
annotations: {
|
|
23
|
+
title: "Get log stream config",
|
|
24
|
+
readOnlyHint: true,
|
|
25
|
+
destructiveHint: false,
|
|
26
|
+
idempotentHint: true,
|
|
27
|
+
openWorldHint: true,
|
|
28
|
+
},
|
|
29
|
+
inputSchema: z.object({
|
|
30
|
+
logType: z
|
|
31
|
+
.enum(["configuration", "network"])
|
|
32
|
+
.describe("The log type: 'configuration' for audit logs, 'network' for network flow logs"),
|
|
33
|
+
}),
|
|
34
|
+
handler: async (input) => {
|
|
35
|
+
return apiGet(`/tailnet/${getTailnet()}/logging/stream/${encPath(input.logType)}`);
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "tailscale_set_log_stream_config",
|
|
40
|
+
description: "Set the log streaming configuration for a specific log type. Configures where logs are sent (e.g. Axiom, Datadog, Splunk, Elasticsearch, S3, GCS).",
|
|
41
|
+
annotations: {
|
|
42
|
+
title: "Set log stream config",
|
|
43
|
+
readOnlyHint: false,
|
|
44
|
+
destructiveHint: false,
|
|
45
|
+
idempotentHint: true,
|
|
46
|
+
openWorldHint: true,
|
|
47
|
+
},
|
|
48
|
+
inputSchema: z.object({
|
|
49
|
+
logType: z
|
|
50
|
+
.enum(["configuration", "network"])
|
|
51
|
+
.describe("The log type: 'configuration' for audit logs, 'network' for network flow logs"),
|
|
52
|
+
destinationType: z
|
|
53
|
+
.string()
|
|
54
|
+
.describe("The destination type (e.g. 'axiom', 'datadog', 'splunk', 'elasticsearch', 'panther', 's3', 'gcs', 'cribl')"),
|
|
55
|
+
url: z.string().optional().describe("Destination URL (required for most destination types)"),
|
|
56
|
+
token: z.string().optional().describe("Authentication token or API key for the destination"),
|
|
57
|
+
user: z.string().optional().describe("Username for the destination (if required)"),
|
|
58
|
+
}),
|
|
59
|
+
handler: async (input) => {
|
|
60
|
+
const { logType, ...body } = input;
|
|
61
|
+
const cleanBody = {};
|
|
62
|
+
for (const [key, value] of Object.entries(body)) {
|
|
63
|
+
if (value !== undefined)
|
|
64
|
+
cleanBody[key] = value;
|
|
65
|
+
}
|
|
66
|
+
return apiPut(`/tailnet/${getTailnet()}/logging/stream/${encPath(logType)}`, cleanBody);
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "tailscale_delete_log_stream_config",
|
|
71
|
+
description: "Delete a log streaming configuration. Logs will stop being sent to the configured destination.",
|
|
72
|
+
annotations: {
|
|
73
|
+
title: "Delete log stream config",
|
|
74
|
+
readOnlyHint: false,
|
|
75
|
+
destructiveHint: true,
|
|
76
|
+
idempotentHint: true,
|
|
77
|
+
openWorldHint: true,
|
|
78
|
+
},
|
|
79
|
+
inputSchema: z.object({
|
|
80
|
+
logType: z
|
|
81
|
+
.enum(["configuration", "network"])
|
|
82
|
+
.describe("The log type to stop streaming: 'configuration' or 'network'"),
|
|
83
|
+
}),
|
|
84
|
+
handler: async (input) => {
|
|
85
|
+
return apiDelete(`/tailnet/${getTailnet()}/logging/stream/${encPath(input.logType)}`);
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
//# sourceMappingURL=log-streaming.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-streaming.js","sourceRoot":"","sources":["../../src/tools/log-streaming.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,EAAW,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEpF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B;QACE,IAAI,EAAE,mCAAmC;QACzC,WAAW,EACT,mKAAmK;QACrK,WAAW,EAAE;YACX,KAAK,EAAE,y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AC,YAAY,UAAU,EAAE,mBAAmB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACxF,CAAC;KACF;CACO,CAAC"}
|
|
@@ -2,6 +2,13 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const networkLockTools: readonly [{
|
|
3
3
|
readonly name: "tailscale_get_network_lock_status";
|
|
4
4
|
readonly description: "Get the tailnet lock (network lock) status, including whether it is enabled and the list of trusted signing keys.";
|
|
5
|
+
readonly annotations: {
|
|
6
|
+
readonly title: "Get network lock status";
|
|
7
|
+
readonly readOnlyHint: true;
|
|
8
|
+
readonly destructiveHint: false;
|
|
9
|
+
readonly idempotentHint: true;
|
|
10
|
+
readonly openWorldHint: true;
|
|
11
|
+
};
|
|
5
12
|
readonly inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
6
13
|
readonly handler: () => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
7
14
|
}];
|
|
@@ -4,6 +4,13 @@ export const networkLockTools = [
|
|
|
4
4
|
{
|
|
5
5
|
name: "tailscale_get_network_lock_status",
|
|
6
6
|
description: "Get the tailnet lock (network lock) status, including whether it is enabled and the list of trusted signing keys.",
|
|
7
|
+
annotations: {
|
|
8
|
+
title: "Get network lock status",
|
|
9
|
+
readOnlyHint: true,
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
idempotentHint: true,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
},
|
|
7
14
|
inputSchema: z.object({}),
|
|
8
15
|
handler: async () => {
|
|
9
16
|
return apiGet(`/tailnet/${getTailnet()}/network-lock/status`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-lock.js","sourceRoot":"","sources":["../../src/tools/network-lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B;QACE,IAAI,EAAE,mCAAmC;QACzC,WAAW,EACT,mHAAmH;QACrH,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,OAAO,MAAM,CAAC,YAAY,UAAU,EAAE,sBAAsB,CAAC,CAAC;QAChE,CAAC;KACF;CACO,CAAC"}
|
|
1
|
+
{"version":3,"file":"network-lock.js","sourceRoot":"","sources":["../../src/tools/network-lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B;QACE,IAAI,EAAE,mCAAmC;QACzC,WAAW,EACT,mHAAmH;QACrH,WAAW,EAAE;YACX,KAAK,EAAE,yBAAyB;YAChC,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;QACD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,OAAO,MAAM,CAAC,YAAY,UAAU,EAAE,sBAAsB,CAAC,CAAC;QAChE,CAAC;KACF;CACO,CAAC"}
|