@togglhq/mcp 1.11.5 → 1.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +2 -2
- package/build/index.js +1 -1
- package/build/{src-BSADtY46.js → src-BkmLNZ2p.js} +32 -120
- package/package.json +1 -1
package/build/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as initProductAnalytics, c as shutdownProductAnalytics, i as getProductAnalyticsDistinctId, n as runMcpCli, o as redactUnsafeSentryMessages, r as captureToolInvocation, s as resolveProductAnalyticsDistinctId } from "./src-
|
|
2
|
+
import { a as initProductAnalytics, c as shutdownProductAnalytics, i as getProductAnalyticsDistinctId, n as runMcpCli, o as redactUnsafeSentryMessages, r as captureToolInvocation, s as resolveProductAnalyticsDistinctId } from "./src-BkmLNZ2p.js";
|
|
3
3
|
import * as Sentry from "@sentry/node";
|
|
4
4
|
//#region src/analytics-tool-metadata.ts
|
|
5
5
|
/**
|
|
@@ -165,7 +165,7 @@ function wrapServerWithProductAnalytics(server) {
|
|
|
165
165
|
}
|
|
166
166
|
//#endregion
|
|
167
167
|
//#region src/cli.ts
|
|
168
|
-
const packageVersion = "1.11.
|
|
168
|
+
const packageVersion = "1.11.6";
|
|
169
169
|
let sentryEnabled = false;
|
|
170
170
|
let productAnalyticsEnabled = false;
|
|
171
171
|
runMcpCli({
|
package/build/index.js
CHANGED
|
@@ -32773,10 +32773,6 @@ function _joinExpects$1(values$1, separator) {
|
|
|
32773
32773
|
*/
|
|
32774
32774
|
const ISO_DATE_REGEX$1 = /^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])$/u;
|
|
32775
32775
|
/**
|
|
32776
|
-
* [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time regex.
|
|
32777
|
-
*/
|
|
32778
|
-
const ISO_DATE_TIME_REGEX$1 = /^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])[T ](?:0\d|1\d|2[0-3]):[0-5]\d$/u;
|
|
32779
|
-
/**
|
|
32780
32776
|
* [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp regex. Allows a
|
|
32781
32777
|
* space as a date/time separator and an optional space before the UTC offset.
|
|
32782
32778
|
*/
|
|
@@ -32830,22 +32826,6 @@ function isoDate$1(message$1) {
|
|
|
32830
32826
|
};
|
|
32831
32827
|
}
|
|
32832
32828
|
/* @__NO_SIDE_EFFECTS__ */
|
|
32833
|
-
function isoDateTime$1(message$1) {
|
|
32834
|
-
return {
|
|
32835
|
-
kind: "validation",
|
|
32836
|
-
type: "iso_date_time",
|
|
32837
|
-
reference: isoDateTime$1,
|
|
32838
|
-
async: false,
|
|
32839
|
-
expects: null,
|
|
32840
|
-
requirement: ISO_DATE_TIME_REGEX$1,
|
|
32841
|
-
message: message$1,
|
|
32842
|
-
"~run"(dataset, config$1) {
|
|
32843
|
-
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue$1(this, "date-time", dataset, config$1);
|
|
32844
|
-
return dataset;
|
|
32845
|
-
}
|
|
32846
|
-
};
|
|
32847
|
-
}
|
|
32848
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
32849
32829
|
function isoTimestamp(message$1) {
|
|
32850
32830
|
return {
|
|
32851
32831
|
kind: "validation",
|
|
@@ -35429,14 +35409,14 @@ function isHttpError(error) {
|
|
|
35429
35409
|
}
|
|
35430
35410
|
//#endregion
|
|
35431
35411
|
//#region ../focus-queries/dist/utils/requests.ts
|
|
35432
|
-
const META_SYMBOL
|
|
35433
|
-
function withResponseMeta
|
|
35412
|
+
const META_SYMBOL = Symbol.for("querygen:response:meta");
|
|
35413
|
+
function withResponseMeta(data, headers, status) {
|
|
35434
35414
|
if (!data) return data;
|
|
35435
35415
|
const meta = {
|
|
35436
35416
|
headers: Object.fromEntries(headers.entries()),
|
|
35437
35417
|
status
|
|
35438
35418
|
};
|
|
35439
|
-
if (typeof data === "object") Object.defineProperty(data, META_SYMBOL
|
|
35419
|
+
if (typeof data === "object") Object.defineProperty(data, META_SYMBOL, {
|
|
35440
35420
|
value: meta,
|
|
35441
35421
|
enumerable: false,
|
|
35442
35422
|
writable: false,
|
|
@@ -37422,7 +37402,7 @@ async function getOrganizationUsersClassic(httpClient, organization_id, { worksp
|
|
|
37422
37402
|
include_calendar_integration
|
|
37423
37403
|
}, true)
|
|
37424
37404
|
});
|
|
37425
|
-
return withResponseMeta
|
|
37405
|
+
return withResponseMeta(await response.json(), response.headers, response.status);
|
|
37426
37406
|
}
|
|
37427
37407
|
//#endregion
|
|
37428
37408
|
//#region ../focus-queries/out/utils/requests.js
|
|
@@ -38422,7 +38402,7 @@ const PublicMeEntryRequestSchema = /* @__PURE__ */ object$2({
|
|
|
38422
38402
|
]))
|
|
38423
38403
|
});
|
|
38424
38404
|
//#endregion
|
|
38425
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38405
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.21_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_0f67cdfcb189f7cb2e84dcd5c08e0ebf/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
|
|
38426
38406
|
async function getInvitations(httpClient, signal) {
|
|
38427
38407
|
return (await httpClient.get(`invitations`, { signal })).json();
|
|
38428
38408
|
}
|
|
@@ -38439,22 +38419,7 @@ async function resendInvitation(httpClient, organization_id, organization_user_i
|
|
|
38439
38419
|
return (await httpClient.post(`organizations/${organization_id}/invitations/${organization_user_id}/resend`, { signal })).json();
|
|
38440
38420
|
}
|
|
38441
38421
|
//#endregion
|
|
38442
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38443
|
-
const META_SYMBOL = Symbol.for("querygen:response:meta");
|
|
38444
|
-
function withResponseMeta(data, headers, status) {
|
|
38445
|
-
if (!data) return data;
|
|
38446
|
-
const meta = {
|
|
38447
|
-
headers: Object.fromEntries(headers.entries()),
|
|
38448
|
-
status
|
|
38449
|
-
};
|
|
38450
|
-
if (typeof data === "object") Object.defineProperty(data, META_SYMBOL, {
|
|
38451
|
-
value: meta,
|
|
38452
|
-
enumerable: false,
|
|
38453
|
-
writable: false,
|
|
38454
|
-
configurable: false
|
|
38455
|
-
});
|
|
38456
|
-
return data;
|
|
38457
|
-
}
|
|
38422
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.21_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_0f67cdfcb189f7cb2e84dcd5c08e0ebf/node_modules/@toggl/queries/dist/org/utils/requests.mjs
|
|
38458
38423
|
function buildSearchParams(params, flattenArrays = false) {
|
|
38459
38424
|
const searchParams = new URLSearchParams();
|
|
38460
38425
|
Object.entries(params).forEach(([key, value]) => {
|
|
@@ -38466,7 +38431,7 @@ function buildSearchParams(params, flattenArrays = false) {
|
|
|
38466
38431
|
return searchParams;
|
|
38467
38432
|
}
|
|
38468
38433
|
//#endregion
|
|
38469
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38434
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.21_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_0f67cdfcb189f7cb2e84dcd5c08e0ebf/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
|
|
38470
38435
|
async function getOrganizationUser(httpClient, organization_id, organization_user_id, signal) {
|
|
38471
38436
|
return (await httpClient.get(`organizations/${organization_id}/users/${organization_user_id}`, { signal })).json();
|
|
38472
38437
|
}
|
|
@@ -38480,7 +38445,7 @@ async function patchOrganizationUserActive(httpClient, organization_id, organiza
|
|
|
38480
38445
|
return (await httpClient.patch(`organizations/${organization_id}/users/${organization_user_id}/active_status/${status}`, { signal })).json();
|
|
38481
38446
|
}
|
|
38482
38447
|
//#endregion
|
|
38483
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38448
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.21_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_0f67cdfcb189f7cb2e84dcd5c08e0ebf/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
|
|
38484
38449
|
async function getWorkspaces(httpClient, organization_id, signal) {
|
|
38485
38450
|
return (await httpClient.get(`organizations/${organization_id}/workspaces`, { signal })).json();
|
|
38486
38451
|
}
|
|
@@ -38500,24 +38465,23 @@ const WorkingHoursUpdateInputSchema = /* @__PURE__ */ object$2({
|
|
|
38500
38465
|
});
|
|
38501
38466
|
const StatusOKSchema = /* @__PURE__ */ object$2({ status: /* @__PURE__ */ string$1() });
|
|
38502
38467
|
//#endregion
|
|
38503
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38504
|
-
async function
|
|
38505
|
-
|
|
38468
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.21_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_0f67cdfcb189f7cb2e84dcd5c08e0ebf/node_modules/@toggl/queries/dist/org/holiday-calendar/requests.mjs
|
|
38469
|
+
async function holidayListDates(httpClient, organization_id, { year, country }, signal) {
|
|
38470
|
+
return (await httpClient.get(`holidays/organizations/${organization_id}/calendar/dates`, {
|
|
38506
38471
|
signal,
|
|
38507
38472
|
searchParams: buildSearchParams({
|
|
38508
|
-
|
|
38509
|
-
|
|
38473
|
+
year,
|
|
38474
|
+
country
|
|
38510
38475
|
}, true)
|
|
38511
|
-
});
|
|
38512
|
-
return withResponseMeta(await response.json(), response.headers, response.status);
|
|
38476
|
+
})).json();
|
|
38513
38477
|
}
|
|
38514
38478
|
//#endregion
|
|
38515
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38479
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.21_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_0f67cdfcb189f7cb2e84dcd5c08e0ebf/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
|
|
38516
38480
|
async function getStatus(httpClient, signal) {
|
|
38517
38481
|
return (await httpClient.get(`shared_data/api/status`, { signal })).json();
|
|
38518
38482
|
}
|
|
38519
38483
|
//#endregion
|
|
38520
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38484
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.21_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_0f67cdfcb189f7cb2e84dcd5c08e0ebf/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
|
|
38521
38485
|
async function timeoffListMyEntries(httpClient, organization_id, { from, to }, signal) {
|
|
38522
38486
|
return (await httpClient.get(`timeoff/organizations/${organization_id}/me`, {
|
|
38523
38487
|
signal,
|
|
@@ -38545,7 +38509,7 @@ async function timeoffDeleteMyEntry(httpClient, organization_id, id, signal) {
|
|
|
38545
38509
|
return response.json();
|
|
38546
38510
|
}
|
|
38547
38511
|
//#endregion
|
|
38548
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38512
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.21_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_0f67cdfcb189f7cb2e84dcd5c08e0ebf/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
|
|
38549
38513
|
async function getMyWorkingHours(httpClient, organization_id, signal) {
|
|
38550
38514
|
return (await httpClient.get(`shared_data/api/workinghours/${organization_id}/me`, { signal })).json();
|
|
38551
38515
|
}
|
|
@@ -38570,7 +38534,7 @@ async function deleteMyWorkingHours(httpClient, organization_id, data, signal) {
|
|
|
38570
38534
|
return response.json();
|
|
38571
38535
|
}
|
|
38572
38536
|
//#endregion
|
|
38573
|
-
//#region ../cli-core/build/focus-client-
|
|
38537
|
+
//#region ../cli-core/build/focus-client-C-6hmEQA.js
|
|
38574
38538
|
/** Request header the API reads to attribute traffic to MCP or CLI. */
|
|
38575
38539
|
const TOGGL_CLIENT_HEADER = "X-Toggl-Client";
|
|
38576
38540
|
/** Header the Focus API reads for analytics and presence `platform_origin`. */
|
|
@@ -39458,11 +39422,15 @@ var FocusClient = class {
|
|
|
39458
39422
|
return this.softValidateResponse("getSharedDataStatus", StatusOKSchema, response);
|
|
39459
39423
|
}
|
|
39460
39424
|
async listPublicHolidays(year, country) {
|
|
39461
|
-
const response = await this.run("listPublicHolidays", () =>
|
|
39462
|
-
|
|
39425
|
+
const response = await this.run("listPublicHolidays", () => holidayListDates(this.orgHttp, this.organizationIdNum, country === void 0 ? { year } : {
|
|
39426
|
+
year,
|
|
39427
|
+
country
|
|
39428
|
+
}));
|
|
39429
|
+
if (!response.ok) return response;
|
|
39430
|
+
return {
|
|
39463
39431
|
ok: true,
|
|
39464
|
-
data: response.data
|
|
39465
|
-
}
|
|
39432
|
+
data: response.data.dates
|
|
39433
|
+
};
|
|
39466
39434
|
}
|
|
39467
39435
|
async getMyWorkingHoursShared() {
|
|
39468
39436
|
const response = await this.run("getMyWorkingHoursShared", () => getMyWorkingHours(this.sharedDataHttp, this.organizationIdNum));
|
|
@@ -40639,7 +40607,7 @@ function createAuthenticatedClientProxy() {
|
|
|
40639
40607
|
} });
|
|
40640
40608
|
}
|
|
40641
40609
|
//#endregion
|
|
40642
|
-
//#region ../operations/build/validation-
|
|
40610
|
+
//#region ../operations/build/validation-CvDIY-Ah.js
|
|
40643
40611
|
const optionalNumber = /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2());
|
|
40644
40612
|
const perPageField = (max) => /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ integer(), /* @__PURE__ */ minValue$1(1), /* @__PURE__ */ maxValue$1(max), /* @__PURE__ */ description$1(`Results per page (1-${max})`)));
|
|
40645
40613
|
const perPageSchema = perPageField(100);
|
|
@@ -41987,7 +41955,7 @@ const orgSharedOperations = [
|
|
|
41987
41955
|
resource: "holidays",
|
|
41988
41956
|
action: "list",
|
|
41989
41957
|
title: "List public holidays",
|
|
41990
|
-
description: "List
|
|
41958
|
+
description: "List organization holiday calendar dates for a year (optional ISO country override).",
|
|
41991
41959
|
safety: "read",
|
|
41992
41960
|
destructive: false,
|
|
41993
41961
|
cli: {
|
|
@@ -42786,7 +42754,7 @@ async function getProjectRatesSummary(httpClient, organization_id, workspace_id,
|
|
|
42786
42754
|
search
|
|
42787
42755
|
})
|
|
42788
42756
|
});
|
|
42789
|
-
return withResponseMeta
|
|
42757
|
+
return withResponseMeta(await response.json(), response.headers, response.status);
|
|
42790
42758
|
}
|
|
42791
42759
|
async function getProjectRates(httpClient, organization_id, workspace_id, project_id, { order_by } = {}, signal) {
|
|
42792
42760
|
return await httpClient.get(`organizations/${organization_id}/workspaces/${workspace_id}/projects/${project_id}/rates`, {
|
|
@@ -43405,12 +43373,6 @@ async function withdrawTimesheet(httpClient, organization_id, workspace_id, setu
|
|
|
43405
43373
|
}
|
|
43406
43374
|
//#endregion
|
|
43407
43375
|
//#region ../focus-queries/dist/user-settings/requests.ts
|
|
43408
|
-
async function emailUnsubscribePage(httpClient, token, signal) {
|
|
43409
|
-
return await httpClient.get(`email/unsubscribe/${token}`, { signal }).json();
|
|
43410
|
-
}
|
|
43411
|
-
async function emailUnsubscribe(httpClient, token, signal) {
|
|
43412
|
-
return await httpClient.post(`email/unsubscribe/${token}`, { signal }).json();
|
|
43413
|
-
}
|
|
43414
43376
|
async function getUserSettings(httpClient, signal) {
|
|
43415
43377
|
return await httpClient.get(`users/me/settings`, { signal }).json();
|
|
43416
43378
|
}
|
|
@@ -53473,56 +53435,6 @@ const generatedFocusOperations = [
|
|
|
53473
53435
|
return client.listOrgUsers(data);
|
|
53474
53436
|
}
|
|
53475
53437
|
},
|
|
53476
|
-
{
|
|
53477
|
-
id: "focus.users.settings-email-unsubscribe",
|
|
53478
|
-
family: "focus",
|
|
53479
|
-
resource: "users",
|
|
53480
|
-
action: "settings-email-unsubscribe",
|
|
53481
|
-
title: "Settings Email Unsubscribe Users",
|
|
53482
|
-
description: "Settings Email Unsubscribe Users.",
|
|
53483
|
-
safety: "update",
|
|
53484
|
-
destructive: false,
|
|
53485
|
-
cli: {
|
|
53486
|
-
group: ["users", "settings"],
|
|
53487
|
-
command: "email-unsubscribe",
|
|
53488
|
-
interactive: "default"
|
|
53489
|
-
},
|
|
53490
|
-
mcp: { entityTool: "users" },
|
|
53491
|
-
inputSchema: /* @__PURE__ */ looseObject({ token: /* @__PURE__ */ string$1() }),
|
|
53492
|
-
execute: (input, { client }) => {
|
|
53493
|
-
const data = input;
|
|
53494
|
-
return client.runGeneratedRequest("emailUnsubscribe", () => callGeneratedRequest(emailUnsubscribe, [
|
|
53495
|
-
client.httpClient,
|
|
53496
|
-
data.token,
|
|
53497
|
-
void 0
|
|
53498
|
-
]));
|
|
53499
|
-
}
|
|
53500
|
-
},
|
|
53501
|
-
{
|
|
53502
|
-
id: "focus.users.settings-email-unsubscribe-page",
|
|
53503
|
-
family: "focus",
|
|
53504
|
-
resource: "users",
|
|
53505
|
-
action: "settings-email-unsubscribe-page",
|
|
53506
|
-
title: "Settings Email Unsubscribe Page Users",
|
|
53507
|
-
description: "Settings Email Unsubscribe Page Users.",
|
|
53508
|
-
safety: "read",
|
|
53509
|
-
destructive: false,
|
|
53510
|
-
cli: {
|
|
53511
|
-
group: ["users", "settings"],
|
|
53512
|
-
command: "email-unsubscribe-page",
|
|
53513
|
-
interactive: "available"
|
|
53514
|
-
},
|
|
53515
|
-
mcp: { entityTool: "users" },
|
|
53516
|
-
inputSchema: /* @__PURE__ */ looseObject({ token: /* @__PURE__ */ string$1() }),
|
|
53517
|
-
execute: (input, { client }) => {
|
|
53518
|
-
const data = input;
|
|
53519
|
-
return client.runGeneratedRequest("emailUnsubscribePage", () => callGeneratedRequest(emailUnsubscribePage, [
|
|
53520
|
-
client.httpClient,
|
|
53521
|
-
data.token,
|
|
53522
|
-
void 0
|
|
53523
|
-
]));
|
|
53524
|
-
}
|
|
53525
|
-
},
|
|
53526
53438
|
{
|
|
53527
53439
|
id: "focus.users.settings-list",
|
|
53528
53440
|
family: "focus",
|
|
@@ -55130,7 +55042,7 @@ function registerWorkspaceTools(server) {
|
|
|
55130
55042
|
//#region src/package-version.ts
|
|
55131
55043
|
function mcpPackageVersion() {
|
|
55132
55044
|
try {
|
|
55133
|
-
return "1.11.
|
|
55045
|
+
return "1.11.6";
|
|
55134
55046
|
} catch {
|
|
55135
55047
|
return "unknown";
|
|
55136
55048
|
}
|
|
@@ -55305,7 +55217,7 @@ import_main.default.config({
|
|
|
55305
55217
|
quiet: true,
|
|
55306
55218
|
ignore: ["MISSING_ENV_FILE"]
|
|
55307
55219
|
});
|
|
55308
|
-
const packageVersion = "1.11.
|
|
55220
|
+
const packageVersion = "1.11.6";
|
|
55309
55221
|
function resolvePublicUrls() {
|
|
55310
55222
|
return {
|
|
55311
55223
|
focusApiUrl: process.env.TOGGL_FOCUS_API_URL ?? "https://focus.toggl.com",
|
|
@@ -55370,4 +55282,4 @@ function bootstrapServer(options = {}) {
|
|
|
55370
55282
|
//#endregion
|
|
55371
55283
|
export { initProductAnalytics as a, shutdownProductAnalytics as c, getProductAnalyticsDistinctId as i, runMcpCli as n, redactUnsafeSentryMessages as o, captureToolInvocation as r, resolveProductAnalyticsDistinctId as s, bootstrapServer as t };
|
|
55372
55284
|
|
|
55373
|
-
//# sourceMappingURL=src-
|
|
55285
|
+
//# sourceMappingURL=src-BkmLNZ2p.js.map
|