@openziti/ziti-mcp-server 0.1.0
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/LICENSE +201 -0
- package/README.md +868 -0
- package/dist/auth/client-credentials-flow.d.ts +21 -0
- package/dist/auth/client-credentials-flow.js +63 -0
- package/dist/auth/client-credentials-flow.js.map +1 -0
- package/dist/auth/device-auth-flow.d.ts +47 -0
- package/dist/auth/device-auth-flow.js +291 -0
- package/dist/auth/device-auth-flow.js.map +1 -0
- package/dist/clients/base.d.ts +74 -0
- package/dist/clients/base.js +109 -0
- package/dist/clients/base.js.map +1 -0
- package/dist/clients/claude.d.ts +22 -0
- package/dist/clients/claude.js +40 -0
- package/dist/clients/claude.js.map +1 -0
- package/dist/clients/cursor.d.ts +22 -0
- package/dist/clients/cursor.js +39 -0
- package/dist/clients/cursor.js.map +1 -0
- package/dist/clients/index.d.ts +33 -0
- package/dist/clients/index.js +39 -0
- package/dist/clients/index.js.map +1 -0
- package/dist/clients/types.d.ts +70 -0
- package/dist/clients/types.js +2 -0
- package/dist/clients/types.js.map +1 -0
- package/dist/clients/utils.d.ts +22 -0
- package/dist/clients/utils.js +46 -0
- package/dist/clients/utils.js.map +1 -0
- package/dist/clients/vscode.d.ts +76 -0
- package/dist/clients/vscode.js +159 -0
- package/dist/clients/vscode.js.map +1 -0
- package/dist/clients/windsurf.d.ts +22 -0
- package/dist/clients/windsurf.js +39 -0
- package/dist/clients/windsurf.js.map +1 -0
- package/dist/commands/init.d.ts +45 -0
- package/dist/commands/init.js +133 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/logout.d.ts +12 -0
- package/dist/commands/logout.js +90 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/run.d.ts +15 -0
- package/dist/commands/run.js +94 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/session.d.ts +12 -0
- package/dist/commands/session.js +99 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +105 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +67 -0
- package/dist/server.js +171 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/api-sessions.d.ts +3 -0
- package/dist/tools/api-sessions.js +86 -0
- package/dist/tools/api-sessions.js.map +1 -0
- package/dist/tools/auth-policies.d.ts +3 -0
- package/dist/tools/auth-policies.js +347 -0
- package/dist/tools/auth-policies.js.map +1 -0
- package/dist/tools/authenticators.d.ts +3 -0
- package/dist/tools/authenticators.js +183 -0
- package/dist/tools/authenticators.js.map +1 -0
- package/dist/tools/certificate-authorities.d.ts +3 -0
- package/dist/tools/certificate-authorities.js +288 -0
- package/dist/tools/certificate-authorities.js.map +1 -0
- package/dist/tools/config-types.d.ts +3 -0
- package/dist/tools/config-types.js +194 -0
- package/dist/tools/config-types.js.map +1 -0
- package/dist/tools/configs.d.ts +3 -0
- package/dist/tools/configs.js +203 -0
- package/dist/tools/configs.js.map +1 -0
- package/dist/tools/controller-settings.d.ts +3 -0
- package/dist/tools/controller-settings.js +219 -0
- package/dist/tools/controller-settings.js.map +1 -0
- package/dist/tools/controllers.d.ts +3 -0
- package/dist/tools/controllers.js +89 -0
- package/dist/tools/controllers.js.map +1 -0
- package/dist/tools/edge-router-policies.d.ts +3 -0
- package/dist/tools/edge-router-policies.js +262 -0
- package/dist/tools/edge-router-policies.js.map +1 -0
- package/dist/tools/edge-routers.d.ts +3 -0
- package/dist/tools/edge-routers.js +381 -0
- package/dist/tools/edge-routers.js.map +1 -0
- package/dist/tools/enrollments.d.ts +3 -0
- package/dist/tools/enrollments.js +187 -0
- package/dist/tools/enrollments.js.map +1 -0
- package/dist/tools/external-jwt-signers.d.ts +3 -0
- package/dist/tools/external-jwt-signers.js +242 -0
- package/dist/tools/external-jwt-signers.js.map +1 -0
- package/dist/tools/identities.d.ts +3 -0
- package/dist/tools/identities.js +741 -0
- package/dist/tools/identities.js.map +1 -0
- package/dist/tools/identity-types.d.ts +3 -0
- package/dist/tools/identity-types.js +58 -0
- package/dist/tools/identity-types.js.map +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.js +101 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/posture-checks.d.ts +3 -0
- package/dist/tools/posture-checks.js +254 -0
- package/dist/tools/posture-checks.js.map +1 -0
- package/dist/tools/routers.d.ts +3 -0
- package/dist/tools/routers.js +169 -0
- package/dist/tools/routers.js.map +1 -0
- package/dist/tools/service-edge-router-policies.d.ts +3 -0
- package/dist/tools/service-edge-router-policies.js +282 -0
- package/dist/tools/service-edge-router-policies.js.map +1 -0
- package/dist/tools/service-policies.d.ts +3 -0
- package/dist/tools/service-policies.js +311 -0
- package/dist/tools/service-policies.js.map +1 -0
- package/dist/tools/services.d.ts +3 -0
- package/dist/tools/services.js +403 -0
- package/dist/tools/services.js.map +1 -0
- package/dist/tools/sessions.d.ts +3 -0
- package/dist/tools/sessions.js +86 -0
- package/dist/tools/sessions.js.map +1 -0
- package/dist/tools/terminators.d.ts +3 -0
- package/dist/tools/terminators.js +187 -0
- package/dist/tools/terminators.js.map +1 -0
- package/dist/tools/transit-routers.d.ts +3 -0
- package/dist/tools/transit-routers.js +169 -0
- package/dist/tools/transit-routers.js.map +1 -0
- package/dist/utils/analytics.d.ts +75 -0
- package/dist/utils/analytics.js +191 -0
- package/dist/utils/analytics.js.map +1 -0
- package/dist/utils/auth0-client.d.ts +27 -0
- package/dist/utils/auth0-client.js +67 -0
- package/dist/utils/auth0-client.js.map +1 -0
- package/dist/utils/authenticated-client.d.ts +6 -0
- package/dist/utils/authenticated-client.js +55 -0
- package/dist/utils/authenticated-client.js.map +1 -0
- package/dist/utils/config.d.ts +65 -0
- package/dist/utils/config.js +80 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/constants.d.ts +15 -0
- package/dist/utils/constants.js +17 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/controller-client/client/client.gen.d.ts +2 -0
- package/dist/utils/controller-client/client/client.gen.js +229 -0
- package/dist/utils/controller-client/client/client.gen.js.map +1 -0
- package/dist/utils/controller-client/client/index.d.ts +8 -0
- package/dist/utils/controller-client/client/index.js +7 -0
- package/dist/utils/controller-client/client/index.js.map +1 -0
- package/dist/utils/controller-client/client/types.gen.d.ts +117 -0
- package/dist/utils/controller-client/client/types.gen.js +3 -0
- package/dist/utils/controller-client/client/types.gen.js.map +1 -0
- package/dist/utils/controller-client/client/utils.gen.d.ts +33 -0
- package/dist/utils/controller-client/client/utils.gen.js +232 -0
- package/dist/utils/controller-client/client/utils.gen.js.map +1 -0
- package/dist/utils/controller-client/client.gen.d.ts +12 -0
- package/dist/utils/controller-client/client.gen.js +6 -0
- package/dist/utils/controller-client/client.gen.js.map +1 -0
- package/dist/utils/controller-client/core/auth.gen.d.ts +18 -0
- package/dist/utils/controller-client/core/auth.gen.js +15 -0
- package/dist/utils/controller-client/core/auth.gen.js.map +1 -0
- package/dist/utils/controller-client/core/bodySerializer.gen.d.ts +25 -0
- package/dist/utils/controller-client/core/bodySerializer.gen.js +58 -0
- package/dist/utils/controller-client/core/bodySerializer.gen.js.map +1 -0
- package/dist/utils/controller-client/core/params.gen.d.ts +43 -0
- package/dist/utils/controller-client/core/params.gen.js +101 -0
- package/dist/utils/controller-client/core/params.gen.js.map +1 -0
- package/dist/utils/controller-client/core/pathSerializer.gen.d.ts +33 -0
- package/dist/utils/controller-client/core/pathSerializer.gen.js +115 -0
- package/dist/utils/controller-client/core/pathSerializer.gen.js.map +1 -0
- package/dist/utils/controller-client/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/utils/controller-client/core/queryKeySerializer.gen.js +100 -0
- package/dist/utils/controller-client/core/queryKeySerializer.gen.js.map +1 -0
- package/dist/utils/controller-client/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/utils/controller-client/core/serverSentEvents.gen.js +136 -0
- package/dist/utils/controller-client/core/serverSentEvents.gen.js.map +1 -0
- package/dist/utils/controller-client/core/types.gen.d.ts +78 -0
- package/dist/utils/controller-client/core/types.gen.js +3 -0
- package/dist/utils/controller-client/core/types.gen.js.map +1 -0
- package/dist/utils/controller-client/core/utils.gen.d.ts +19 -0
- package/dist/utils/controller-client/core/utils.gen.js +88 -0
- package/dist/utils/controller-client/core/utils.gen.js.map +1 -0
- package/dist/utils/controller-client/index.d.ts +2 -0
- package/dist/utils/controller-client/index.js +3 -0
- package/dist/utils/controller-client/index.js.map +1 -0
- package/dist/utils/controller-client/sdk.gen.d.ts +1302 -0
- package/dist/utils/controller-client/sdk.gen.js +4436 -0
- package/dist/utils/controller-client/sdk.gen.js.map +1 -0
- package/dist/utils/controller-client/types.gen.d.ts +9170 -0
- package/dist/utils/controller-client/types.gen.js +3 -0
- package/dist/utils/controller-client/types.gen.js.map +1 -0
- package/dist/utils/glob.d.ts +75 -0
- package/dist/utils/glob.js +110 -0
- package/dist/utils/glob.js.map +1 -0
- package/dist/utils/http-utility.d.ts +5 -0
- package/dist/utils/http-utility.js +68 -0
- package/dist/utils/http-utility.js.map +1 -0
- package/dist/utils/keychain.d.ts +129 -0
- package/dist/utils/keychain.js +193 -0
- package/dist/utils/keychain.js.map +1 -0
- package/dist/utils/logger.d.ts +4 -0
- package/dist/utils/logger.js +28 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/package.d.ts +3 -0
- package/dist/utils/package.js +9 -0
- package/dist/utils/package.js.map +1 -0
- package/dist/utils/scopes.d.ts +12 -0
- package/dist/utils/scopes.js +19 -0
- package/dist/utils/scopes.js.map +1 -0
- package/dist/utils/terminal.d.ts +35 -0
- package/dist/utils/terminal.js +409 -0
- package/dist/utils/terminal.js.map +1 -0
- package/dist/utils/tools.d.ts +63 -0
- package/dist/utils/tools.js +149 -0
- package/dist/utils/tools.js.map +1 -0
- package/dist/utils/types.d.ts +55 -0
- package/dist/utils/types.js +3 -0
- package/dist/utils/types.js.map +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { createErrorResponse } from '../utils/http-utility.js';
|
|
2
|
+
import { withAuthenticatedClient } from '../utils/authenticated-client.js';
|
|
3
|
+
import { listTerminators, detailTerminator, createTerminator, deleteTerminator, patchTerminator, } from '../utils/controller-client/sdk.gen.js';
|
|
4
|
+
// Define all available Terminator tools
|
|
5
|
+
export const TERMINATOR_TOOLS = [
|
|
6
|
+
{
|
|
7
|
+
name: 'listTerminators',
|
|
8
|
+
description: 'List all Terminators in the Ziti network',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {},
|
|
12
|
+
},
|
|
13
|
+
_meta: {
|
|
14
|
+
requiredScopes: ['read:terminators'],
|
|
15
|
+
readOnly: true,
|
|
16
|
+
},
|
|
17
|
+
annotations: {
|
|
18
|
+
title: 'List all Terminators defined in the Ziti network.',
|
|
19
|
+
readOnlyHint: true,
|
|
20
|
+
destructiveHint: false,
|
|
21
|
+
idempotentHint: true,
|
|
22
|
+
openWorldHint: false,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'listTerminator',
|
|
27
|
+
description: 'Get details about a specific Ziti Terminator',
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: 'object',
|
|
30
|
+
properties: {
|
|
31
|
+
id: { type: 'string', description: 'ID of the terminator to retrieve' },
|
|
32
|
+
},
|
|
33
|
+
required: ['id'],
|
|
34
|
+
},
|
|
35
|
+
_meta: {
|
|
36
|
+
requiredScopes: ['read:terminators'],
|
|
37
|
+
readOnly: true,
|
|
38
|
+
},
|
|
39
|
+
annotations: {
|
|
40
|
+
title: 'Get Ziti Terminator Details',
|
|
41
|
+
readOnlyHint: true,
|
|
42
|
+
destructiveHint: false,
|
|
43
|
+
idempotentHint: true,
|
|
44
|
+
openWorldHint: false,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'createTerminator',
|
|
49
|
+
description: 'Create a new Ziti Terminator.',
|
|
50
|
+
inputSchema: {
|
|
51
|
+
type: 'object',
|
|
52
|
+
properties: {
|
|
53
|
+
service: { type: 'string', description: 'ID of the service this terminator is for' },
|
|
54
|
+
router: { type: 'string', description: 'ID of the router hosting this terminator' },
|
|
55
|
+
binding: { type: 'string', description: 'The binding type (e.g. "transport")' },
|
|
56
|
+
address: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: 'The address the terminator connects to (e.g. "tcp:localhost:8080")',
|
|
59
|
+
},
|
|
60
|
+
cost: { type: 'number', description: 'Cost for this terminator' },
|
|
61
|
+
precedence: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
enum: ['default', 'required', 'failed'],
|
|
64
|
+
description: 'Precedence level for this terminator',
|
|
65
|
+
},
|
|
66
|
+
identity: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
description: 'Identity string for the terminator',
|
|
69
|
+
},
|
|
70
|
+
identitySecret: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: 'Identity secret for the terminator',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
required: ['service', 'router', 'binding', 'address'],
|
|
76
|
+
},
|
|
77
|
+
_meta: {
|
|
78
|
+
requiredScopes: ['write:terminators'],
|
|
79
|
+
readOnly: false,
|
|
80
|
+
},
|
|
81
|
+
annotations: {
|
|
82
|
+
title: 'Create a new Terminator in the Ziti network.',
|
|
83
|
+
readOnlyHint: false,
|
|
84
|
+
destructiveHint: false,
|
|
85
|
+
idempotentHint: false,
|
|
86
|
+
openWorldHint: false,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'deleteTerminator',
|
|
91
|
+
description: 'Delete a Ziti Terminator.',
|
|
92
|
+
inputSchema: {
|
|
93
|
+
type: 'object',
|
|
94
|
+
properties: {
|
|
95
|
+
id: { type: 'string', description: 'ID of the terminator to delete' },
|
|
96
|
+
},
|
|
97
|
+
required: ['id'],
|
|
98
|
+
},
|
|
99
|
+
_meta: {
|
|
100
|
+
requiredScopes: ['write:terminators'],
|
|
101
|
+
readOnly: false,
|
|
102
|
+
},
|
|
103
|
+
annotations: {
|
|
104
|
+
title: 'Delete a Terminator from the Ziti network.',
|
|
105
|
+
readOnlyHint: false,
|
|
106
|
+
destructiveHint: true,
|
|
107
|
+
idempotentHint: false,
|
|
108
|
+
openWorldHint: false,
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'updateTerminator',
|
|
113
|
+
description: 'Update an existing Ziti Terminator.',
|
|
114
|
+
inputSchema: {
|
|
115
|
+
type: 'object',
|
|
116
|
+
properties: {
|
|
117
|
+
id: { type: 'string', description: 'ID of the terminator to update' },
|
|
118
|
+
service: { type: 'string', description: 'ID of the service' },
|
|
119
|
+
router: { type: 'string', description: 'ID of the router' },
|
|
120
|
+
binding: { type: 'string', description: 'The binding type' },
|
|
121
|
+
address: { type: 'string', description: 'The address the terminator connects to' },
|
|
122
|
+
cost: { type: 'number', description: 'Cost for this terminator' },
|
|
123
|
+
precedence: {
|
|
124
|
+
type: 'string',
|
|
125
|
+
enum: ['default', 'required', 'failed'],
|
|
126
|
+
description: 'Precedence level for this terminator',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
required: ['id'],
|
|
130
|
+
},
|
|
131
|
+
_meta: {
|
|
132
|
+
requiredScopes: ['write:terminators'],
|
|
133
|
+
readOnly: false,
|
|
134
|
+
},
|
|
135
|
+
annotations: {
|
|
136
|
+
title: 'Update an existing Terminator in the Ziti network.',
|
|
137
|
+
readOnlyHint: false,
|
|
138
|
+
destructiveHint: true,
|
|
139
|
+
idempotentHint: true,
|
|
140
|
+
openWorldHint: false,
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
];
|
|
144
|
+
// Define handlers for each Terminator tool
|
|
145
|
+
export const TERMINATOR_HANDLERS = {
|
|
146
|
+
listTerminators: (request, config) => withAuthenticatedClient(request, config, 'list terminators', (client, ztSession) => listTerminators({ client, headers: { 'zt-session': ztSession } })),
|
|
147
|
+
listTerminator: (request, config) => {
|
|
148
|
+
const { id } = request.parameters;
|
|
149
|
+
if (!id)
|
|
150
|
+
return Promise.resolve(createErrorResponse('Error: id is required'));
|
|
151
|
+
return withAuthenticatedClient(request, config, 'get terminator', (client, ztSession) => detailTerminator({ path: { id }, client, headers: { 'zt-session': ztSession } }));
|
|
152
|
+
},
|
|
153
|
+
createTerminator: (request, config) => {
|
|
154
|
+
const { service, router, binding, address, cost, precedence, identity, identitySecret } = request.parameters;
|
|
155
|
+
if (!service)
|
|
156
|
+
return Promise.resolve(createErrorResponse('Error: service is required'));
|
|
157
|
+
if (!router)
|
|
158
|
+
return Promise.resolve(createErrorResponse('Error: router is required'));
|
|
159
|
+
if (!binding)
|
|
160
|
+
return Promise.resolve(createErrorResponse('Error: binding is required'));
|
|
161
|
+
if (!address)
|
|
162
|
+
return Promise.resolve(createErrorResponse('Error: address is required'));
|
|
163
|
+
return withAuthenticatedClient(request, config, 'create terminator', (client, ztSession) => createTerminator({
|
|
164
|
+
body: { service, router, binding, address, cost, precedence, identity, identitySecret },
|
|
165
|
+
client,
|
|
166
|
+
headers: { 'zt-session': ztSession },
|
|
167
|
+
}));
|
|
168
|
+
},
|
|
169
|
+
deleteTerminator: (request, config) => {
|
|
170
|
+
const { id } = request.parameters;
|
|
171
|
+
if (!id)
|
|
172
|
+
return Promise.resolve(createErrorResponse('Error: id is required'));
|
|
173
|
+
return withAuthenticatedClient(request, config, 'delete terminator', (client, ztSession) => deleteTerminator({ path: { id }, client, headers: { 'zt-session': ztSession } }));
|
|
174
|
+
},
|
|
175
|
+
updateTerminator: (request, config) => {
|
|
176
|
+
const { id, service, router, binding, address, cost, precedence } = request.parameters;
|
|
177
|
+
if (!id)
|
|
178
|
+
return Promise.resolve(createErrorResponse('Error: id is required'));
|
|
179
|
+
return withAuthenticatedClient(request, config, 'update terminator', (client, ztSession) => patchTerminator({
|
|
180
|
+
path: { id },
|
|
181
|
+
body: { service, router, binding, address, cost, precedence },
|
|
182
|
+
client,
|
|
183
|
+
headers: { 'zt-session': ztSession },
|
|
184
|
+
}));
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
//# sourceMappingURL=terminators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminators.js","sourceRoot":"","sources":["../../src/tools/terminators.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,uCAAuC,CAAC;AAE/C,wCAAwC;AACxC,MAAM,CAAC,MAAM,gBAAgB,GAAW;IACtC;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,0CAA0C;QACvD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;QACD,KAAK,EAAE;YACL,cAAc,EAAE,CAAC,kBAAkB,CAAC;YACpC,QAAQ,EAAE,IAAI;SACf;QACD,WAAW,EAAE;YACX,KAAK,EAAE,mDAAmD;YAC1D,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,KAAK;SACrB;KACF;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,8CAA8C;QAC3D,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kCAAkC,EAAE;aACxE;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;QACD,KAAK,EAAE;YACL,cAAc,EAAE,CAAC,kBAAkB,CAAC;YACpC,QAAQ,EAAE,IAAI;SACf;QACD,WAAW,EAAE;YACX,KAAK,EAAE,6BAA6B;YACpC,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;Y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E,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;QACvF,IAAI,CAAC,EAAE;YAAE,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,uBAAuB,CAAC,CAAC,CAAC;QAC9E,OAAO,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,CACzF,eAAe,CAAC;YACd,IAAI,EAAE,EAAE,EAAE,EAAE;YACZ,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE;YAC7D,MAAM;YACN,OAAO,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE;SACrC,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { HandlerConfig, HandlerRequest, HandlerResponse, Tool } from '../utils/types.js';
|
|
2
|
+
export declare const TRANSIT_ROUTER_TOOLS: Tool[];
|
|
3
|
+
export declare const TRANSIT_ROUTER_HANDLERS: Record<string, (request: HandlerRequest, config: HandlerConfig) => Promise<HandlerResponse>>;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { createErrorResponse } from '../utils/http-utility.js';
|
|
2
|
+
import { withAuthenticatedClient } from '../utils/authenticated-client.js';
|
|
3
|
+
import { listTransitRouters, detailTransitRouter, createTransitRouter, deleteTransitRouter, patchTransitRouter, } from '../utils/controller-client/sdk.gen.js';
|
|
4
|
+
// Define all available Transit Router tools
|
|
5
|
+
export const TRANSIT_ROUTER_TOOLS = [
|
|
6
|
+
{
|
|
7
|
+
name: 'listTransitRouters',
|
|
8
|
+
description: 'List all Transit Routers in the Ziti network',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {},
|
|
12
|
+
},
|
|
13
|
+
_meta: {
|
|
14
|
+
requiredScopes: ['read:transit-routers'],
|
|
15
|
+
readOnly: true,
|
|
16
|
+
},
|
|
17
|
+
annotations: {
|
|
18
|
+
title: 'List all Transit Routers defined in the Ziti network.',
|
|
19
|
+
readOnlyHint: true,
|
|
20
|
+
destructiveHint: false,
|
|
21
|
+
idempotentHint: true,
|
|
22
|
+
openWorldHint: false,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'listTransitRouter',
|
|
27
|
+
description: 'Get details about a specific Ziti Transit Router',
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: 'object',
|
|
30
|
+
properties: {
|
|
31
|
+
id: { type: 'string', description: 'ID of the transit router to retrieve' },
|
|
32
|
+
},
|
|
33
|
+
required: ['id'],
|
|
34
|
+
},
|
|
35
|
+
_meta: {
|
|
36
|
+
requiredScopes: ['read:transit-routers'],
|
|
37
|
+
readOnly: true,
|
|
38
|
+
},
|
|
39
|
+
annotations: {
|
|
40
|
+
title: 'Get Ziti Transit Router Details',
|
|
41
|
+
readOnlyHint: true,
|
|
42
|
+
destructiveHint: false,
|
|
43
|
+
idempotentHint: true,
|
|
44
|
+
openWorldHint: false,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'createTransitRouter',
|
|
49
|
+
description: 'Create a new Ziti Transit Router.',
|
|
50
|
+
inputSchema: {
|
|
51
|
+
type: 'object',
|
|
52
|
+
properties: {
|
|
53
|
+
name: { type: 'string', description: 'Name of the transit router to create' },
|
|
54
|
+
cost: { type: 'number', description: 'Cost for routing through this transit router' },
|
|
55
|
+
noTraversal: {
|
|
56
|
+
type: 'boolean',
|
|
57
|
+
description: 'Whether transit is disabled for this router',
|
|
58
|
+
default: false,
|
|
59
|
+
},
|
|
60
|
+
disabled: {
|
|
61
|
+
type: 'boolean',
|
|
62
|
+
description: 'Whether the transit router is disabled',
|
|
63
|
+
default: false,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
required: ['name'],
|
|
67
|
+
},
|
|
68
|
+
_meta: {
|
|
69
|
+
requiredScopes: ['write:transit-routers'],
|
|
70
|
+
readOnly: false,
|
|
71
|
+
},
|
|
72
|
+
annotations: {
|
|
73
|
+
title: 'Create a new Transit Router in the Ziti network.',
|
|
74
|
+
readOnlyHint: false,
|
|
75
|
+
destructiveHint: false,
|
|
76
|
+
idempotentHint: false,
|
|
77
|
+
openWorldHint: false,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'deleteTransitRouter',
|
|
82
|
+
description: 'Delete a Ziti Transit Router.',
|
|
83
|
+
inputSchema: {
|
|
84
|
+
type: 'object',
|
|
85
|
+
properties: {
|
|
86
|
+
id: { type: 'string', description: 'ID of the transit router to delete' },
|
|
87
|
+
},
|
|
88
|
+
required: ['id'],
|
|
89
|
+
},
|
|
90
|
+
_meta: {
|
|
91
|
+
requiredScopes: ['write:transit-routers'],
|
|
92
|
+
readOnly: false,
|
|
93
|
+
},
|
|
94
|
+
annotations: {
|
|
95
|
+
title: 'Delete a Transit Router from the Ziti network.',
|
|
96
|
+
readOnlyHint: false,
|
|
97
|
+
destructiveHint: true,
|
|
98
|
+
idempotentHint: false,
|
|
99
|
+
openWorldHint: false,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'updateTransitRouter',
|
|
104
|
+
description: 'Update an existing Ziti Transit Router.',
|
|
105
|
+
inputSchema: {
|
|
106
|
+
type: 'object',
|
|
107
|
+
properties: {
|
|
108
|
+
id: { type: 'string', description: 'ID of the transit router to update' },
|
|
109
|
+
name: { type: 'string', description: 'Name to give the transit router' },
|
|
110
|
+
cost: { type: 'number', description: 'Cost for routing through this transit router' },
|
|
111
|
+
noTraversal: {
|
|
112
|
+
type: 'boolean',
|
|
113
|
+
description: 'Whether transit is disabled for this router',
|
|
114
|
+
},
|
|
115
|
+
disabled: { type: 'boolean', description: 'Whether the transit router is disabled' },
|
|
116
|
+
},
|
|
117
|
+
required: ['id'],
|
|
118
|
+
},
|
|
119
|
+
_meta: {
|
|
120
|
+
requiredScopes: ['write:transit-routers'],
|
|
121
|
+
readOnly: false,
|
|
122
|
+
},
|
|
123
|
+
annotations: {
|
|
124
|
+
title: 'Update an existing Transit Router in the Ziti network.',
|
|
125
|
+
readOnlyHint: false,
|
|
126
|
+
destructiveHint: true,
|
|
127
|
+
idempotentHint: true,
|
|
128
|
+
openWorldHint: false,
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
];
|
|
132
|
+
// Define handlers for each Transit Router tool
|
|
133
|
+
export const TRANSIT_ROUTER_HANDLERS = {
|
|
134
|
+
listTransitRouters: (request, config) => withAuthenticatedClient(request, config, 'list transit routers', (client, ztSession) => listTransitRouters({ client, headers: { 'zt-session': ztSession } })),
|
|
135
|
+
listTransitRouter: (request, config) => {
|
|
136
|
+
const { id } = request.parameters;
|
|
137
|
+
if (!id)
|
|
138
|
+
return Promise.resolve(createErrorResponse('Error: id is required'));
|
|
139
|
+
return withAuthenticatedClient(request, config, 'get transit router', (client, ztSession) => detailTransitRouter({ path: { id }, client, headers: { 'zt-session': ztSession } }));
|
|
140
|
+
},
|
|
141
|
+
createTransitRouter: (request, config) => {
|
|
142
|
+
const { name, cost, noTraversal = false, disabled = false } = request.parameters;
|
|
143
|
+
if (!name)
|
|
144
|
+
return Promise.resolve(createErrorResponse('Error: name is required'));
|
|
145
|
+
return withAuthenticatedClient(request, config, 'create transit router', (client, ztSession) => createTransitRouter({
|
|
146
|
+
body: { name, cost, noTraversal, disabled },
|
|
147
|
+
client,
|
|
148
|
+
headers: { 'zt-session': ztSession },
|
|
149
|
+
}));
|
|
150
|
+
},
|
|
151
|
+
deleteTransitRouter: (request, config) => {
|
|
152
|
+
const { id } = request.parameters;
|
|
153
|
+
if (!id)
|
|
154
|
+
return Promise.resolve(createErrorResponse('Error: id is required'));
|
|
155
|
+
return withAuthenticatedClient(request, config, 'delete transit router', (client, ztSession) => deleteTransitRouter({ path: { id }, client, headers: { 'zt-session': ztSession } }));
|
|
156
|
+
},
|
|
157
|
+
updateTransitRouter: (request, config) => {
|
|
158
|
+
const { id, name, cost, noTraversal, disabled } = request.parameters;
|
|
159
|
+
if (!id)
|
|
160
|
+
return Promise.resolve(createErrorResponse('Error: id is required'));
|
|
161
|
+
return withAuthenticatedClient(request, config, 'update transit router', (client, ztSession) => patchTransitRouter({
|
|
162
|
+
path: { id },
|
|
163
|
+
body: { name, cost, noTraversal, disabled },
|
|
164
|
+
client,
|
|
165
|
+
headers: { 'zt-session': ztSession },
|
|
166
|
+
}));
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
//# sourceMappingURL=transit-routers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transit-routers.js","sourceRoot":"","sources":["../../src/tools/transit-routers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,uCAAuC,CAAC;AAE/C,4CAA4C;AAC5C,MAAM,CAAC,MAAM,oBAAoB,GAAW;IAC1C;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,8CAA8C;QAC3D,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;QACD,KAAK,EAAE;YACL,cAAc,EAAE,CAAC,sBAAsB,CAAC;YACxC,QAAQ,EAAE,IAAI;SACf;QACD,WAAW,EAAE;YACX,KAAK,EAAE,uDAAuD;YAC9D,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,KAAK;SACrB;KACF;IACD;QACE,IAAI,EAAE,mBAAmB;QAC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|
1
|
+
/**
|
|
2
|
+
* TrackEvent class for managing analytics events
|
|
3
|
+
*/
|
|
4
|
+
export declare class TrackEvent {
|
|
5
|
+
private appId;
|
|
6
|
+
private endpoint;
|
|
7
|
+
/**
|
|
8
|
+
* Constructor for TrackEvent
|
|
9
|
+
*
|
|
10
|
+
* @param appId - Heap app ID
|
|
11
|
+
* @param endpoint - Heap endpoint URL
|
|
12
|
+
*/
|
|
13
|
+
constructor(appId: string, endpoint: string);
|
|
14
|
+
/**
|
|
15
|
+
* Track a command run event
|
|
16
|
+
*
|
|
17
|
+
* @param command - The command path that was run
|
|
18
|
+
*/
|
|
19
|
+
trackCommandRun(command: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Track init event
|
|
22
|
+
*
|
|
23
|
+
* @param clientType - Type of client being configured
|
|
24
|
+
*/
|
|
25
|
+
trackInit(clientType?: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Track server run event
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
trackServerRun(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Track tool usage event
|
|
33
|
+
*
|
|
34
|
+
* @param toolName - The name of the tool being used
|
|
35
|
+
* @param success - Whether the tool execution was successful
|
|
36
|
+
*/
|
|
37
|
+
trackTool(toolName: string, success?: boolean): void;
|
|
38
|
+
/**
|
|
39
|
+
* Internal method to track an event
|
|
40
|
+
*
|
|
41
|
+
* @param eventName - Name of the event to track
|
|
42
|
+
* @param customProperties - Additional properties for the event
|
|
43
|
+
*/
|
|
44
|
+
private track;
|
|
45
|
+
/**
|
|
46
|
+
* Creates an event object
|
|
47
|
+
*/
|
|
48
|
+
private createEvent;
|
|
49
|
+
/**
|
|
50
|
+
* Sends an event to Heap Analytics
|
|
51
|
+
*/
|
|
52
|
+
private sendEvent;
|
|
53
|
+
/**
|
|
54
|
+
* Generate a run event name from a command path
|
|
55
|
+
*/
|
|
56
|
+
private generateRunEventName;
|
|
57
|
+
/**
|
|
58
|
+
* Generate an event name from a command path and action
|
|
59
|
+
*/
|
|
60
|
+
private generateEventName;
|
|
61
|
+
/**
|
|
62
|
+
* Get common properties for all events
|
|
63
|
+
*/
|
|
64
|
+
private getCommonProperties;
|
|
65
|
+
/**
|
|
66
|
+
* Determine if tracking should be enabled
|
|
67
|
+
*/
|
|
68
|
+
private shouldTrack;
|
|
69
|
+
/**
|
|
70
|
+
* Get current timestamp in milliseconds
|
|
71
|
+
*/
|
|
72
|
+
private timestamp;
|
|
73
|
+
}
|
|
74
|
+
declare const trackEvent: TrackEvent;
|
|
75
|
+
export default trackEvent;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Analytics implementation for tracking events to Heap Analytics
|
|
3
|
+
*/
|
|
4
|
+
import crypto from 'crypto';
|
|
5
|
+
import { createRequire } from 'module';
|
|
6
|
+
import { log } from './logger.js';
|
|
7
|
+
const require = createRequire(import.meta.url);
|
|
8
|
+
const packageJson = require('../../package.json');
|
|
9
|
+
// Extract package coordinates
|
|
10
|
+
const packageVersion = packageJson.version;
|
|
11
|
+
// Constants
|
|
12
|
+
const EVENT_NAME_PREFIX = 'openziti-mcp-server';
|
|
13
|
+
// Common property keys
|
|
14
|
+
const VERSION_KEY = 'version';
|
|
15
|
+
const OS_KEY = 'os';
|
|
16
|
+
const ARCH_KEY = 'arch';
|
|
17
|
+
const NODE_VERSION = 'node_version';
|
|
18
|
+
const APP_NAME = 'app_name';
|
|
19
|
+
/**
|
|
20
|
+
* TrackEvent class for managing analytics events
|
|
21
|
+
*/
|
|
22
|
+
export class TrackEvent {
|
|
23
|
+
appId;
|
|
24
|
+
endpoint;
|
|
25
|
+
/**
|
|
26
|
+
* Constructor for TrackEvent
|
|
27
|
+
*
|
|
28
|
+
* @param appId - Heap app ID
|
|
29
|
+
* @param endpoint - Heap endpoint URL
|
|
30
|
+
*/
|
|
31
|
+
constructor(appId, endpoint) {
|
|
32
|
+
this.appId = appId;
|
|
33
|
+
this.endpoint = endpoint;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Track a command run event
|
|
37
|
+
*
|
|
38
|
+
* @param command - The command path that was run
|
|
39
|
+
*/
|
|
40
|
+
trackCommandRun(command) {
|
|
41
|
+
const eventName = this.generateRunEventName(command);
|
|
42
|
+
this.track(eventName);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Track init event
|
|
46
|
+
*
|
|
47
|
+
* @param clientType - Type of client being configured
|
|
48
|
+
*/
|
|
49
|
+
trackInit(clientType) {
|
|
50
|
+
const eventName = `${EVENT_NAME_PREFIX}-init`;
|
|
51
|
+
const properties = {
|
|
52
|
+
clientType: clientType || 'unknown',
|
|
53
|
+
...this.getCommonProperties(),
|
|
54
|
+
};
|
|
55
|
+
this.track(eventName, properties);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Track server run event
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
trackServerRun() {
|
|
62
|
+
const eventName = `${EVENT_NAME_PREFIX}-run`;
|
|
63
|
+
this.track(eventName);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Track tool usage event
|
|
67
|
+
*
|
|
68
|
+
* @param toolName - The name of the tool being used
|
|
69
|
+
* @param success - Whether the tool execution was successful
|
|
70
|
+
*/
|
|
71
|
+
trackTool(toolName, success = true) {
|
|
72
|
+
const eventName = `${EVENT_NAME_PREFIX}-tool-${toolName}`;
|
|
73
|
+
const properties = {
|
|
74
|
+
success,
|
|
75
|
+
...this.getCommonProperties(),
|
|
76
|
+
};
|
|
77
|
+
this.track(eventName, properties);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Internal method to track an event
|
|
81
|
+
*
|
|
82
|
+
* @param eventName - Name of the event to track
|
|
83
|
+
* @param customProperties - Additional properties for the event
|
|
84
|
+
*/
|
|
85
|
+
track(eventName, customProperties) {
|
|
86
|
+
if (!this.shouldTrack()) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const event = this.createEvent(eventName, customProperties);
|
|
90
|
+
this.sendEvent(event).catch((err) => {
|
|
91
|
+
// Silently handle errors in tracking
|
|
92
|
+
log('Analytics tracking error:', err?.message);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Creates an event object
|
|
97
|
+
*/
|
|
98
|
+
createEvent(eventName, customProperties) {
|
|
99
|
+
return {
|
|
100
|
+
app_id: this.appId,
|
|
101
|
+
identity: crypto.randomUUID(),
|
|
102
|
+
event: eventName,
|
|
103
|
+
timestamp: this.timestamp(),
|
|
104
|
+
properties: {
|
|
105
|
+
...this.getCommonProperties(),
|
|
106
|
+
...customProperties,
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Sends an event to Heap Analytics
|
|
112
|
+
*/
|
|
113
|
+
async sendEvent(event) {
|
|
114
|
+
try {
|
|
115
|
+
const response = await fetch(this.endpoint, {
|
|
116
|
+
method: 'POST',
|
|
117
|
+
headers: {
|
|
118
|
+
'Content-Type': 'application/json',
|
|
119
|
+
},
|
|
120
|
+
body: JSON.stringify(event),
|
|
121
|
+
});
|
|
122
|
+
if (!response.ok) {
|
|
123
|
+
const errorText = await response.text();
|
|
124
|
+
log(`Heap track API error: ${response.status} - ${errorText}`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
log('Error sending event to Heap:', error);
|
|
129
|
+
throw error;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Generate a run event name from a command path
|
|
134
|
+
*/
|
|
135
|
+
generateRunEventName(command) {
|
|
136
|
+
return this.generateEventName(command, 'Run');
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Generate an event name from a command path and action
|
|
140
|
+
*/
|
|
141
|
+
generateEventName(command, action) {
|
|
142
|
+
const commands = command
|
|
143
|
+
.trim()
|
|
144
|
+
.split(/\s+/)
|
|
145
|
+
.map((cmd) => cmd.charAt(0).toUpperCase() + cmd.slice(1));
|
|
146
|
+
if (commands.length === 1) {
|
|
147
|
+
return `${EVENT_NAME_PREFIX}-${commands[0]}-${action}`;
|
|
148
|
+
}
|
|
149
|
+
else if (commands.length === 2) {
|
|
150
|
+
return `${EVENT_NAME_PREFIX}-${commands[0]}-${commands[1]}-${action}`;
|
|
151
|
+
}
|
|
152
|
+
else if (commands.length >= 3) {
|
|
153
|
+
return `${EVENT_NAME_PREFIX}-${commands[1]}-${commands.slice(2).join(' ')}-${action}`;
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
return EVENT_NAME_PREFIX;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Get common properties for all events
|
|
161
|
+
*/
|
|
162
|
+
getCommonProperties() {
|
|
163
|
+
return {
|
|
164
|
+
[APP_NAME]: EVENT_NAME_PREFIX,
|
|
165
|
+
[VERSION_KEY]: packageVersion,
|
|
166
|
+
[OS_KEY]: process.platform,
|
|
167
|
+
[ARCH_KEY]: process.arch,
|
|
168
|
+
[NODE_VERSION]: process.version,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Determine if tracking should be enabled
|
|
173
|
+
*/
|
|
174
|
+
shouldTrack() {
|
|
175
|
+
return false; // TEMP
|
|
176
|
+
return process.env.OPENZITI_MCP_ANALYTICS !== 'false';
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Get current timestamp in milliseconds
|
|
180
|
+
*/
|
|
181
|
+
timestamp() {
|
|
182
|
+
return Date.now();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const HEAP_CONFIG = {
|
|
186
|
+
appId: '1279799279',
|
|
187
|
+
endpoint: 'https://heapanalytics.com/api/track',
|
|
188
|
+
};
|
|
189
|
+
const trackEvent = new TrackEvent(HEAP_CONFIG.appId, HEAP_CONFIG.endpoint);
|
|
190
|
+
export default trackEvent;
|
|
191
|
+
//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