@togglhq/mcp 1.13.0 → 1.13.2
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-Wi0RVSpx.js → src-B6rTtBIK.js} +29 -23
- package/package.json +1 -1
package/build/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as PUBLIC_SENTRY_PRIVACY_OPTIONS, c as initProductAnalytics, d as shutdownProductAnalytics, i as runMcpCli, l as resolveProductAnalyticsDistinctId, o as captureToolInvocation, s as getProductAnalyticsDistinctId, u as resolvePublicSentryDsn } from "./src-
|
|
2
|
+
import { a as PUBLIC_SENTRY_PRIVACY_OPTIONS, c as initProductAnalytics, d as shutdownProductAnalytics, i as runMcpCli, l as resolveProductAnalyticsDistinctId, o as captureToolInvocation, s as getProductAnalyticsDistinctId, u as resolvePublicSentryDsn } from "./src-B6rTtBIK.js";
|
|
3
3
|
import * as Sentry from "@sentry/node";
|
|
4
4
|
//#region src/analytics-tool-metadata.ts
|
|
5
5
|
/**
|
|
@@ -162,7 +162,7 @@ function wrapServerWithProductAnalytics(server) {
|
|
|
162
162
|
}
|
|
163
163
|
//#endregion
|
|
164
164
|
//#region src/cli.ts
|
|
165
|
-
const packageVersion = "1.13.
|
|
165
|
+
const packageVersion = "1.13.2";
|
|
166
166
|
let sentryEnabled = false;
|
|
167
167
|
let productAnalyticsEnabled = false;
|
|
168
168
|
runMcpCli({
|
package/build/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as runMcpCli, n as MCP_MAX_TOOL_INPUT_ELEMENTS, r as bootstrapServer, t as MCP_CACHE_TTL_MS } from "./src-
|
|
2
|
+
import { i as runMcpCli, n as MCP_MAX_TOOL_INPUT_ELEMENTS, r as bootstrapServer, t as MCP_CACHE_TTL_MS } from "./src-B6rTtBIK.js";
|
|
3
3
|
export { MCP_CACHE_TTL_MS, MCP_MAX_TOOL_INPUT_ELEMENTS, bootstrapServer, runMcpCli };
|
|
@@ -38423,7 +38423,7 @@ const PublicMeEntryRequestSchema = /* @__PURE__ */ object$2({
|
|
|
38423
38423
|
]))
|
|
38424
38424
|
});
|
|
38425
38425
|
//#endregion
|
|
38426
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38426
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.190_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_b1184b7a85021c667b7a3d6b36f4d1b5/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
|
|
38427
38427
|
async function getInvitations(httpClient, signal) {
|
|
38428
38428
|
return (await httpClient.get(`invitations`, { signal })).json();
|
|
38429
38429
|
}
|
|
@@ -38440,7 +38440,7 @@ async function resendInvitation(httpClient, organization_id, organization_user_i
|
|
|
38440
38440
|
return (await httpClient.post(`organizations/${organization_id}/invitations/${organization_user_id}/resend`, { signal })).json();
|
|
38441
38441
|
}
|
|
38442
38442
|
//#endregion
|
|
38443
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38443
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.190_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_b1184b7a85021c667b7a3d6b36f4d1b5/node_modules/@toggl/queries/dist/org/utils/requests.mjs
|
|
38444
38444
|
function buildSearchParams(params, flattenArrays = false) {
|
|
38445
38445
|
const searchParams = new URLSearchParams();
|
|
38446
38446
|
Object.entries(params).forEach(([key, value]) => {
|
|
@@ -38452,7 +38452,7 @@ function buildSearchParams(params, flattenArrays = false) {
|
|
|
38452
38452
|
return searchParams;
|
|
38453
38453
|
}
|
|
38454
38454
|
//#endregion
|
|
38455
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38455
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.190_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_b1184b7a85021c667b7a3d6b36f4d1b5/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
|
|
38456
38456
|
async function getOrganizationUser(httpClient, organization_id, organization_user_id, signal) {
|
|
38457
38457
|
return (await httpClient.get(`organizations/${organization_id}/users/${organization_user_id}`, { signal })).json();
|
|
38458
38458
|
}
|
|
@@ -38466,7 +38466,7 @@ async function patchOrganizationUserActive(httpClient, organization_id, organiza
|
|
|
38466
38466
|
return (await httpClient.patch(`organizations/${organization_id}/users/${organization_user_id}/active_status/${status}`, { signal })).json();
|
|
38467
38467
|
}
|
|
38468
38468
|
//#endregion
|
|
38469
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38469
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.190_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_b1184b7a85021c667b7a3d6b36f4d1b5/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
|
|
38470
38470
|
async function getWorkspaces(httpClient, organization_id, signal) {
|
|
38471
38471
|
return (await httpClient.get(`organizations/${organization_id}/workspaces`, { signal })).json();
|
|
38472
38472
|
}
|
|
@@ -38486,7 +38486,7 @@ const WorkingHoursUpdateInputSchema = /* @__PURE__ */ object$2({
|
|
|
38486
38486
|
});
|
|
38487
38487
|
const StatusOKSchema = /* @__PURE__ */ object$2({ status: /* @__PURE__ */ string$1() });
|
|
38488
38488
|
//#endregion
|
|
38489
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38489
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.190_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_b1184b7a85021c667b7a3d6b36f4d1b5/node_modules/@toggl/queries/dist/org/holiday-calendar/requests.mjs
|
|
38490
38490
|
async function holidayListDates(httpClient, organization_id, { year, country }, signal) {
|
|
38491
38491
|
return (await httpClient.get(`holidays/organizations/${organization_id}/calendar/dates`, {
|
|
38492
38492
|
signal,
|
|
@@ -38497,12 +38497,12 @@ async function holidayListDates(httpClient, organization_id, { year, country },
|
|
|
38497
38497
|
})).json();
|
|
38498
38498
|
}
|
|
38499
38499
|
//#endregion
|
|
38500
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38500
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.190_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_b1184b7a85021c667b7a3d6b36f4d1b5/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
|
|
38501
38501
|
async function getStatus(httpClient, signal) {
|
|
38502
38502
|
return (await httpClient.get(`shared_data/api/status`, { signal })).json();
|
|
38503
38503
|
}
|
|
38504
38504
|
//#endregion
|
|
38505
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38505
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.190_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_b1184b7a85021c667b7a3d6b36f4d1b5/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
|
|
38506
38506
|
async function timeoffListMyEntries(httpClient, organization_id, { from, to }, signal) {
|
|
38507
38507
|
return (await httpClient.get(`timeoff/organizations/${organization_id}/me`, {
|
|
38508
38508
|
signal,
|
|
@@ -38530,7 +38530,7 @@ async function timeoffDeleteMyEntry(httpClient, organization_id, id, signal) {
|
|
|
38530
38530
|
return response.json();
|
|
38531
38531
|
}
|
|
38532
38532
|
//#endregion
|
|
38533
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.
|
|
38533
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.2.190_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_b1184b7a85021c667b7a3d6b36f4d1b5/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
|
|
38534
38534
|
async function getMyWorkingHours(httpClient, organization_id, signal) {
|
|
38535
38535
|
return (await httpClient.get(`shared_data/api/workinghours/${organization_id}/me`, { signal })).json();
|
|
38536
38536
|
}
|
|
@@ -43329,7 +43329,7 @@ async function updateASavedView(httpClient, workspace_id, id, data, signal) {
|
|
|
43329
43329
|
}
|
|
43330
43330
|
//#endregion
|
|
43331
43331
|
//#region ../focus-queries/dist/search/requests.ts
|
|
43332
|
-
async function search(httpClient, organization_id, workspace_id, { keyword, per_group, assignee_user_id, assignee_team_id, include_unassigned, project_id, task_id, include_drafts, exclude_calendar_events, group_by_tags, only_me }, signal) {
|
|
43332
|
+
async function search(httpClient, organization_id, workspace_id, { keyword, per_group, assignee_user_id, assignee_team_id, include_unassigned, project_id, task_id, include_drafts, exclude_calendar_events, group_by_tags, only_me, occurrence_window_date }, signal) {
|
|
43333
43333
|
return await httpClient.get(`organizations/${organization_id}/workspaces/${workspace_id}/search`, {
|
|
43334
43334
|
signal,
|
|
43335
43335
|
searchParams: buildSearchParams$2({
|
|
@@ -43343,7 +43343,8 @@ async function search(httpClient, organization_id, workspace_id, { keyword, per_
|
|
|
43343
43343
|
include_drafts,
|
|
43344
43344
|
exclude_calendar_events,
|
|
43345
43345
|
group_by_tags,
|
|
43346
|
-
only_me
|
|
43346
|
+
only_me,
|
|
43347
|
+
occurrence_window_date
|
|
43347
43348
|
})
|
|
43348
43349
|
}).json();
|
|
43349
43350
|
}
|
|
@@ -43849,8 +43850,11 @@ async function getTimesheetSetupMembers(httpClient, organization_id, workspace_i
|
|
|
43849
43850
|
searchParams: buildSearchParams$2({ include_discontinued })
|
|
43850
43851
|
}).json();
|
|
43851
43852
|
}
|
|
43852
|
-
async function addTimesheetSetupMember(httpClient, organization_id, workspace_id, setup_id, user_account_id, signal) {
|
|
43853
|
-
return await httpClient.post(`organizations/${organization_id}/workspaces/${workspace_id}/timesheet-setups/${setup_id}/members/${user_account_id}`, {
|
|
43853
|
+
async function addTimesheetSetupMember(httpClient, organization_id, workspace_id, setup_id, user_account_id, data, signal) {
|
|
43854
|
+
return await httpClient.post(`organizations/${organization_id}/workspaces/${workspace_id}/timesheet-setups/${setup_id}/members/${user_account_id}`, {
|
|
43855
|
+
signal,
|
|
43856
|
+
json: data
|
|
43857
|
+
}).json();
|
|
43854
43858
|
}
|
|
43855
43859
|
async function deleteTimesheetSetupMember(httpClient, organization_id, workspace_id, setup_id, user_account_id, signal) {
|
|
43856
43860
|
return await httpClient.delete(`organizations/${organization_id}/workspaces/${workspace_id}/timesheet-setups/${setup_id}/members/${user_account_id}`, { signal }).json();
|
|
@@ -54426,6 +54430,7 @@ const generatedFocusOperations = [
|
|
|
54426
54430
|
},
|
|
54427
54431
|
mcp: { entityTool: "timesheets" },
|
|
54428
54432
|
inputSchema: /* @__PURE__ */ looseObject({
|
|
54433
|
+
payload: /* @__PURE__ */ looseObject({ started_at: /* @__PURE__ */ optional$1(apiDateTimeString) }),
|
|
54429
54434
|
setup_id: /* @__PURE__ */ number$2(),
|
|
54430
54435
|
user_account_id: /* @__PURE__ */ number$2()
|
|
54431
54436
|
}),
|
|
@@ -54437,6 +54442,7 @@ const generatedFocusOperations = [
|
|
|
54437
54442
|
client.workspaceIdNumber,
|
|
54438
54443
|
data.setup_id,
|
|
54439
54444
|
data.user_account_id,
|
|
54445
|
+
data.payload ?? data.data ?? data,
|
|
54440
54446
|
void 0
|
|
54441
54447
|
]));
|
|
54442
54448
|
}
|
|
@@ -56439,12 +56445,12 @@ function registerWorkspaceTools(server) {
|
|
|
56439
56445
|
const runApiTokenAuth = async () => {
|
|
56440
56446
|
const status = await apiTokenStatus();
|
|
56441
56447
|
if (!status.ok) return mcpFailure(status.message);
|
|
56442
|
-
return
|
|
56448
|
+
return mcpJson({
|
|
56443
56449
|
authenticated: true,
|
|
56444
56450
|
requires_workspace_selection: false,
|
|
56445
56451
|
...describeApiTokenIdentity(status.identity),
|
|
56446
56452
|
message: "Signed in with TOGGL_API_TOKEN. No browser sign-in runs and nothing is saved to ~/.toggl/focus-tools.json."
|
|
56447
|
-
}
|
|
56453
|
+
});
|
|
56448
56454
|
};
|
|
56449
56455
|
const runAuth = async ({ workspace_id, accounts_api_url, focus_api_url }) => {
|
|
56450
56456
|
if (isApiTokenMode()) return runApiTokenAuth();
|
|
@@ -56496,12 +56502,12 @@ function registerWorkspaceTools(server) {
|
|
|
56496
56502
|
};
|
|
56497
56503
|
const runLogout = async () => {
|
|
56498
56504
|
pendingAuthContext = null;
|
|
56499
|
-
if (isApiTokenMode()) return
|
|
56505
|
+
if (isApiTokenMode()) return mcpJson({
|
|
56500
56506
|
logged_out: false,
|
|
56501
56507
|
auth_mode: "api_token",
|
|
56502
56508
|
removed_config: false,
|
|
56503
56509
|
message: "This server authenticates with TOGGL_API_TOKEN, so there is no stored session to clear. Remove TOGGL_API_TOKEN from the MCP server config to sign out. Saved OAuth profiles were left untouched."
|
|
56504
|
-
}
|
|
56510
|
+
});
|
|
56505
56511
|
const removed = clearConfig();
|
|
56506
56512
|
return mcpJson({
|
|
56507
56513
|
logged_out: true,
|
|
@@ -56524,12 +56530,12 @@ function registerWorkspaceTools(server) {
|
|
|
56524
56530
|
if (params.refresh) return mcpFailure(mcpOAuthRequiredMessage("workspace-list refresh"));
|
|
56525
56531
|
const status = await apiTokenStatus();
|
|
56526
56532
|
if (!status.ok) return mcpFailure(status.message);
|
|
56527
|
-
return
|
|
56533
|
+
return mcpJson([{
|
|
56528
56534
|
workspace_id: status.identity.workspace_id,
|
|
56529
56535
|
organization_id: status.identity.organization_id,
|
|
56530
56536
|
active: true,
|
|
56531
56537
|
auth_mode: "api_token"
|
|
56532
|
-
}]
|
|
56538
|
+
}]);
|
|
56533
56539
|
}
|
|
56534
56540
|
try {
|
|
56535
56541
|
if (params.refresh) await refreshMcpWorkspaces();
|
|
@@ -56612,11 +56618,11 @@ function registerWorkspaceTools(server) {
|
|
|
56612
56618
|
}, async (_ctx) => {
|
|
56613
56619
|
if (isApiTokenMode()) {
|
|
56614
56620
|
const status = await apiTokenStatus();
|
|
56615
|
-
return
|
|
56621
|
+
return mcpJson({
|
|
56616
56622
|
auth_mode: "api_token",
|
|
56617
56623
|
active: status.ok ? describeApiTokenIdentity(status.identity) : { error: status.message },
|
|
56618
56624
|
message: API_TOKEN_PROFILES_MESSAGE
|
|
56619
|
-
}
|
|
56625
|
+
});
|
|
56620
56626
|
}
|
|
56621
56627
|
return mcpJson(listMcpProfiles().map((row) => ({
|
|
56622
56628
|
name: row.name,
|
|
@@ -56721,7 +56727,7 @@ function registerWorkspaceTools(server) {
|
|
|
56721
56727
|
//#region src/package-version.ts
|
|
56722
56728
|
function mcpPackageVersion() {
|
|
56723
56729
|
try {
|
|
56724
|
-
return "1.13.
|
|
56730
|
+
return "1.13.2";
|
|
56725
56731
|
} catch {
|
|
56726
56732
|
return "unknown";
|
|
56727
56733
|
}
|
|
@@ -56902,7 +56908,7 @@ import_main.default.config({
|
|
|
56902
56908
|
quiet: true,
|
|
56903
56909
|
ignore: ["MISSING_ENV_FILE"]
|
|
56904
56910
|
});
|
|
56905
|
-
const packageVersion = "1.13.
|
|
56911
|
+
const packageVersion = "1.13.2";
|
|
56906
56912
|
const MCP_CACHE_TTL_MS = 300 * 1e3;
|
|
56907
56913
|
const MCP_MAX_TOOL_INPUT_ELEMENTS = 1e4;
|
|
56908
56914
|
function resolvePublicUrls() {
|
|
@@ -57022,4 +57028,4 @@ function bootstrapServer(options = {}) {
|
|
|
57022
57028
|
//#endregion
|
|
57023
57029
|
export { PUBLIC_SENTRY_PRIVACY_OPTIONS as a, initProductAnalytics as c, shutdownProductAnalytics as d, runMcpCli as i, resolveProductAnalyticsDistinctId as l, MCP_MAX_TOOL_INPUT_ELEMENTS as n, captureToolInvocation as o, bootstrapServer as r, getProductAnalyticsDistinctId as s, MCP_CACHE_TTL_MS as t, resolvePublicSentryDsn as u };
|
|
57024
57030
|
|
|
57025
|
-
//# sourceMappingURL=src-
|
|
57031
|
+
//# sourceMappingURL=src-B6rTtBIK.js.map
|