@togglhq/cli 1.13.139 → 1.13.141

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 CHANGED
@@ -243,6 +243,16 @@ toggl statuses list
243
243
  toggl users list
244
244
  ```
245
245
 
246
+ **Links**
247
+
248
+ ```bash
249
+ # Toggl 2.0 web URL for a task (and a Track URL where the IDs map)
250
+ toggl deep-link --entity task --id 12345
251
+
252
+ # Last month's detailed report
253
+ toggl deep-link --entity report --report-type detailed --period prevMonth
254
+ ```
255
+
246
256
  ## Dates
247
257
 
248
258
  `--date-from` and `--date-to` accept:
package/build/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as CommanderError, i as shutdownCliTelemetry, n as captureCliException, r as initCliTelemetry, t as createProgram } from "./program-CzWFOKGE.js";
2
+ import { a as CommanderError, i as shutdownCliTelemetry, n as captureCliException, r as initCliTelemetry, t as createProgram } from "./program-BYXXg7fB.js";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { dirname, join } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
package/build/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as createProgram } from "./program-CzWFOKGE.js";
1
+ import { t as createProgram } from "./program-BYXXg7fB.js";
2
2
  export { createProgram };
@@ -10987,7 +10987,7 @@ const PublicMeEntryRequestSchema = /* @__PURE__ */ object$2({
10987
10987
  ]))
10988
10988
  });
10989
10989
  //#endregion
10990
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.294_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_3fafdbf42ac88ea071a1b4bf518df701/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
10990
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.295_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_e5acbc3a5b17d0e06ad550edd08ba899/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
10991
10991
  async function getInvitations(httpClient, signal) {
10992
10992
  return (await httpClient.get(`invitations`, { signal })).json();
10993
10993
  }
@@ -11004,7 +11004,7 @@ async function resendInvitation(httpClient, organization_id, organization_user_i
11004
11004
  return (await httpClient.post(`organizations/${organization_id}/invitations/${organization_user_id}/resend`, { signal })).json();
11005
11005
  }
11006
11006
  //#endregion
11007
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.294_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_3fafdbf42ac88ea071a1b4bf518df701/node_modules/@toggl/queries/dist/org/utils/requests.mjs
11007
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.295_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_e5acbc3a5b17d0e06ad550edd08ba899/node_modules/@toggl/queries/dist/org/utils/requests.mjs
11008
11008
  function buildSearchParams(params, flattenArrays = false) {
11009
11009
  const searchParams = new URLSearchParams();
11010
11010
  Object.entries(params).forEach(([key, value]) => {
@@ -11016,7 +11016,7 @@ function buildSearchParams(params, flattenArrays = false) {
11016
11016
  return searchParams;
11017
11017
  }
11018
11018
  //#endregion
11019
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.294_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_3fafdbf42ac88ea071a1b4bf518df701/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
11019
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.295_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_e5acbc3a5b17d0e06ad550edd08ba899/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
11020
11020
  async function getOrganizationUser(httpClient, organization_id, organization_user_id, signal) {
11021
11021
  return (await httpClient.get(`organizations/${organization_id}/users/${organization_user_id}`, { signal })).json();
11022
11022
  }
@@ -11031,7 +11031,7 @@ async function patchOrganizationUserActive(httpClient, organization_id, organiza
11031
11031
  return (await httpClient.patch(`organizations/${organization_id}/users/${organization_user_id}/active_status/${status}`, { signal })).json();
11032
11032
  }
11033
11033
  //#endregion
11034
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.294_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_3fafdbf42ac88ea071a1b4bf518df701/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
11034
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.295_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_e5acbc3a5b17d0e06ad550edd08ba899/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
11035
11035
  async function getWorkspaces(httpClient, organization_id, signal) {
11036
11036
  return (await httpClient.get(`organizations/${organization_id}/workspaces`, { signal })).json();
11037
11037
  }
@@ -11051,7 +11051,7 @@ const WorkingHoursUpdateInputSchema = /* @__PURE__ */ object$2({
11051
11051
  });
11052
11052
  const StatusOKSchema = /* @__PURE__ */ object$2({ status: /* @__PURE__ */ string$1() });
11053
11053
  //#endregion
11054
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.294_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_3fafdbf42ac88ea071a1b4bf518df701/node_modules/@toggl/queries/dist/org/holiday-calendar/requests.mjs
11054
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.295_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_e5acbc3a5b17d0e06ad550edd08ba899/node_modules/@toggl/queries/dist/org/holiday-calendar/requests.mjs
11055
11055
  async function holidayListDates(httpClient, organization_id, { year, country }, signal) {
11056
11056
  return (await httpClient.get(`holidays/organizations/${organization_id}/calendar/dates`, {
11057
11057
  signal,
@@ -11062,12 +11062,12 @@ async function holidayListDates(httpClient, organization_id, { year, country },
11062
11062
  })).json();
11063
11063
  }
11064
11064
  //#endregion
11065
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.294_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_3fafdbf42ac88ea071a1b4bf518df701/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
11065
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.295_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_e5acbc3a5b17d0e06ad550edd08ba899/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
11066
11066
  async function getStatus(httpClient, signal) {
11067
11067
  return (await httpClient.get(`shared_data/api/status`, { signal })).json();
11068
11068
  }
11069
11069
  //#endregion
11070
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.294_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_3fafdbf42ac88ea071a1b4bf518df701/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
11070
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.295_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_e5acbc3a5b17d0e06ad550edd08ba899/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
11071
11071
  async function timeoffListMyEntries(httpClient, organization_id, { from, to }, signal) {
11072
11072
  return (await httpClient.get(`timeoff/organizations/${organization_id}/me`, {
11073
11073
  signal,
@@ -11095,7 +11095,7 @@ async function timeoffDeleteMyEntry(httpClient, organization_id, id, signal) {
11095
11095
  return response.json();
11096
11096
  }
11097
11097
  //#endregion
11098
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.294_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_3fafdbf42ac88ea071a1b4bf518df701/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
11098
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.295_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_e5acbc3a5b17d0e06ad550edd08ba899/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
11099
11099
  async function getMyWorkingHours(httpClient, organization_id, signal) {
11100
11100
  return (await httpClient.get(`shared_data/api/workinghours/${organization_id}/me`, { signal })).json();
11101
11101
  }
@@ -11120,7 +11120,7 @@ async function deleteMyWorkingHours(httpClient, organization_id, data, signal) {
11120
11120
  return response.json();
11121
11121
  }
11122
11122
  //#endregion
11123
- //#region ../cli-core/build/focus-client-CGUlmnDg.js
11123
+ //#region ../cli-core/build/focus-client-CGpMYUFy.js
11124
11124
  /** Request header the API reads to attribute traffic to MCP or CLI. */
11125
11125
  const TOGGL_CLIENT_HEADER = "X-Toggl-Client";
11126
11126
  /** Header the Focus API reads for analytics and presence `platform_origin`. */
@@ -11357,9 +11357,12 @@ var FocusClient = class {
11357
11357
  organizationIdNum;
11358
11358
  workspaceId;
11359
11359
  workspaceIdNum;
11360
+ /** Focus origin without the `/api` suffix, e.g. `https://focus.toggl.com`. */
11361
+ focusBaseUrl;
11360
11362
  constructor(config) {
11361
11363
  let baseUrl = config.baseUrl.replace(/\/+$/, "");
11362
11364
  if (!baseUrl.endsWith("/api")) baseUrl += "/api";
11365
+ this.focusBaseUrl = baseUrl.slice(0, -4);
11363
11366
  this.tokenProvider = config.tokenProvider;
11364
11367
  this.clientSurface = config.clientSurface;
11365
11368
  this.userId = config.userId;
@@ -12276,7 +12279,7 @@ function parseIdEnv(env, name) {
12276
12279
  if (id <= 0 || id > Number.MAX_SAFE_INTEGER) throw new ApiTokenAuthError(`${name} must be a positive integer.`);
12277
12280
  return id;
12278
12281
  }
12279
- function positiveId(value) {
12282
+ function positiveId$1(value) {
12280
12283
  return typeof value === "number" && Number.isSafeInteger(value) && value > 0 ? value : void 0;
12281
12284
  }
12282
12285
  function focusApiBase(focusApiUrl) {
@@ -12338,12 +12341,12 @@ async function resolveApiTokenIdentity(options) {
12338
12341
  if (userId === void 0) {
12339
12342
  const me = await getJson(`${api}/accounts/me`, token, options);
12340
12343
  if (me.status === 401) throw new ApiTokenAuthError(INVALID_KEY_MESSAGE, 401);
12341
- userId = positiveId(me.body?.user_account_id);
12344
+ userId = positiveId$1(me.body?.user_account_id);
12342
12345
  if (userId === void 0) throw new ApiTokenAuthError(`Could not determine your Toggl user ID (${me.status}). Set ${TOGGL_USER_ID_ENV}.`, me.status);
12343
12346
  userSource = "api";
12344
12347
  }
12345
- const hostedMcpWorkspaceId = positiveId(settings.body.mcp_active_workspace_id);
12346
- const hostedMcpOrganizationId = positiveId(settings.body.mcp_active_organization_id);
12348
+ const hostedMcpWorkspaceId = positiveId$1(settings.body.mcp_active_workspace_id);
12349
+ const hostedMcpOrganizationId = positiveId$1(settings.body.mcp_active_organization_id);
12347
12350
  let workspaceId;
12348
12351
  let workspaceSource;
12349
12352
  if (options.workspaceIdOverride !== void 0) {
@@ -12353,7 +12356,7 @@ async function resolveApiTokenIdentity(options) {
12353
12356
  workspaceId = envWorkspaceId;
12354
12357
  workspaceSource = "env";
12355
12358
  } else {
12356
- workspaceId = positiveId(settings.body.current_workspace_id) ?? hostedMcpWorkspaceId;
12359
+ workspaceId = positiveId$1(settings.body.current_workspace_id) ?? hostedMcpWorkspaceId;
12357
12360
  workspaceSource = "api";
12358
12361
  }
12359
12362
  if (workspaceId === void 0) throw new ApiTokenAuthError(`Could not determine a workspace: your Toggl 2.0 settings have no current workspace. Set ${TOGGL_WORKSPACE_ID_ENV}.`);
@@ -13546,7 +13549,7 @@ async function runSkillSetup(options) {
13546
13549
  });
13547
13550
  }
13548
13551
  //#endregion
13549
- //#region ../operations/build/validation-Cl22AQf7.js
13552
+ //#region ../operations/build/validation-CQfYPZ9x.js
13550
13553
  const optionalNumber = /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2());
13551
13554
  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})`)));
13552
13555
  const perPageSchema = perPageField(100);
@@ -14584,6 +14587,226 @@ const versionOverrides = { "focus.version.service": {
14584
14587
  description: "MCP package version plus the Focus API service revision.",
14585
14588
  agentGuidance: "mcp.package is this published MCP package version (e.g. 1.8.0). focus_api is the Focus API process revision (git SHA / build number) — it does not change when you update the npm MCP package."
14586
14589
  } };
14590
+ const DEEP_LINK_ENTITIES = [
14591
+ "task",
14592
+ "project",
14593
+ "time_entry",
14594
+ "calendar_day",
14595
+ "report",
14596
+ "member"
14597
+ ];
14598
+ const DEEP_LINK_REPORT_TYPES = [
14599
+ "summary",
14600
+ "detailed",
14601
+ "profitability",
14602
+ "utilization",
14603
+ "workload",
14604
+ "time-accounting",
14605
+ "time-off"
14606
+ ];
14607
+ const DEEP_LINK_REPORT_PERIODS = [
14608
+ "today",
14609
+ "yesterday",
14610
+ "thisWeek",
14611
+ "nextWeek",
14612
+ "weekToDate",
14613
+ "prevWeek",
14614
+ "last2Weeks",
14615
+ "thisMonth",
14616
+ "nextMonth",
14617
+ "prevMonth",
14618
+ "monthToDate",
14619
+ "thisQuarter",
14620
+ "nextQuarter",
14621
+ "quarterToDate",
14622
+ "thisSemester",
14623
+ "semesterToDate",
14624
+ "last30Days",
14625
+ "last90Days",
14626
+ "lastQuarter",
14627
+ "lastSemester",
14628
+ "last12Months",
14629
+ "thisYear",
14630
+ "yearToDate",
14631
+ "prevYear",
14632
+ "allTime"
14633
+ ];
14634
+ const PROJECT_TABS = [
14635
+ "tasks",
14636
+ "board",
14637
+ "timeline",
14638
+ "dashboard",
14639
+ "members",
14640
+ "period"
14641
+ ];
14642
+ const MEMBER_TABS = ["time-off"];
14643
+ const DEEP_LINK_TABS = [...PROJECT_TABS, ...MEMBER_TABS];
14644
+ const PERIOD_REPORT_TYPES = new Set(DEEP_LINK_REPORT_TYPES.filter((type) => type !== "time-off"));
14645
+ const positiveId = /* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ integer(), /* @__PURE__ */ minValue$1(1));
14646
+ const isoDay = /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1("must be YYYY-MM-DD"));
14647
+ const DeepLinkInputSchema = /* @__PURE__ */ object$2({
14648
+ entity: /* @__PURE__ */ picklist$1(DEEP_LINK_ENTITIES),
14649
+ id: /* @__PURE__ */ optional$1(positiveId),
14650
+ task_id: /* @__PURE__ */ optional$1(positiveId),
14651
+ project_id: /* @__PURE__ */ optional$1(positiveId),
14652
+ date: /* @__PURE__ */ optional$1(isoDay),
14653
+ report_type: /* @__PURE__ */ optional$1(/* @__PURE__ */ picklist$1(DEEP_LINK_REPORT_TYPES)),
14654
+ period: /* @__PURE__ */ optional$1(/* @__PURE__ */ picklist$1(DEEP_LINK_REPORT_PERIODS)),
14655
+ from: /* @__PURE__ */ optional$1(isoDay),
14656
+ to: /* @__PURE__ */ optional$1(isoDay),
14657
+ tab: /* @__PURE__ */ optional$1(/* @__PURE__ */ picklist$1(DEEP_LINK_TABS))
14658
+ });
14659
+ const ENTITIES_WITH_ID = new Set([
14660
+ "task",
14661
+ "project",
14662
+ "time_entry",
14663
+ "member"
14664
+ ]);
14665
+ /** Cross-field rules the schema cannot carry; returns the first violation. */
14666
+ function deepLinkInputError(input) {
14667
+ if (input.id === void 0 && ENTITIES_WITH_ID.has(input.entity)) return "id is required for task, project, time_entry and member (member id is the organization user ID)";
14668
+ if (input.tab !== void 0 && !(input.entity === "project" && PROJECT_TABS.includes(input.tab)) && !(input.entity === "member" && MEMBER_TABS.includes(input.tab))) return `tab is ${PROJECT_TABS.join("|")} for project, or ${MEMBER_TABS.join("|")} for member`;
14669
+ if (input.from === void 0 !== (input.to === void 0)) return "from and to must be passed together";
14670
+ if (input.period !== void 0 && input.from !== void 0) return "pass either period or from/to, not both";
14671
+ if ((input.period !== void 0 || input.from !== void 0) && !(input.entity === "report" && PERIOD_REPORT_TYPES.has(input.report_type ?? "summary"))) return "period and from/to apply only to report entities other than time-off";
14672
+ if (input.from !== void 0 && input.to !== void 0 && input.from > input.to) return "from must not be after to";
14673
+ }
14674
+ const FOCUS_HOST_PATTERN = /^focus\.((?:[a-z0-9-]+\.)*toggl\.(?:com|space))$/i;
14675
+ const APP_HOST_PATTERN = /^app\.(toggl\.(?:com|space)|[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.ms\.toggl\.space)$/i;
14676
+ function trackBaseUrlFor(focusBaseUrl) {
14677
+ const hostname = new URL(focusBaseUrl).hostname.toLowerCase();
14678
+ const base = FOCUS_HOST_PATTERN.exec(hostname)?.[1] ?? APP_HOST_PATTERN.exec(hostname)?.[1];
14679
+ return base ? `https://track.${base}` : null;
14680
+ }
14681
+ function withQuery(url, params) {
14682
+ const search = new URLSearchParams();
14683
+ for (const [key, value] of Object.entries(params)) if (value !== void 0) search.set(key, value);
14684
+ const query = search.toString();
14685
+ return query ? `${url}?${query}` : url;
14686
+ }
14687
+ function trackUnmapped(input) {
14688
+ switch (input.entity) {
14689
+ case "calendar_day":
14690
+ case "report": return {
14691
+ url: null,
14692
+ note: "Track calendar and reports are scoped to a Track workspace; a Toggl 2.0 workspace ID is not a Track workspace ID."
14693
+ };
14694
+ default: return {
14695
+ url: null,
14696
+ note: `Toggl 2.0 ${input.entity.replace("_", " ")} IDs are not Track IDs (imports and Track sync create new records), so no Track URL maps.`
14697
+ };
14698
+ }
14699
+ }
14700
+ /** Builds the links for input that already passed `deepLinkInputError`. */
14701
+ function buildDeepLinks(input, context) {
14702
+ const origin = context.focusBaseUrl.replace(/\/+$/, "");
14703
+ const workspaceRoot = `${origin}/${context.organizationId}/workspaces/${context.workspaceId}`;
14704
+ const trackBase = trackBaseUrlFor(origin);
14705
+ let focus;
14706
+ let track = trackUnmapped(input);
14707
+ switch (input.entity) {
14708
+ case "task":
14709
+ focus = {
14710
+ url: withQuery(input.project_id !== void 0 ? `${workspaceRoot}/projects/${input.project_id}` : `${workspaceRoot}/calendar`, { tid: String(input.id) }),
14711
+ note: input.project_id !== void 0 ? "Opens the task editor over its project." : "Opens the task editor over the calendar; pass project_id to open it over the project instead."
14712
+ };
14713
+ break;
14714
+ case "project":
14715
+ focus = { url: `${workspaceRoot}/projects/${input.id}${input.tab ? `/${input.tab}` : ""}` };
14716
+ break;
14717
+ case "time_entry":
14718
+ if (input.task_id !== void 0) focus = {
14719
+ url: withQuery(`${workspaceRoot}/calendar`, {
14720
+ tid: String(input.task_id),
14721
+ teid: String(input.id)
14722
+ }),
14723
+ note: "Opens the time entry inside its task's editor."
14724
+ };
14725
+ else focus = {
14726
+ url: `${workspaceRoot}/calendar`,
14727
+ note: "A time entry is only addressable through its task; pass task_id to open it directly. Without it this is the calendar."
14728
+ };
14729
+ break;
14730
+ case "calendar_day":
14731
+ focus = {
14732
+ url: withQuery(`${workspaceRoot}/calendar`, { d: input.date }),
14733
+ note: input.date ? `Opens the week of ${input.date}.` : "Opens the current week."
14734
+ };
14735
+ break;
14736
+ case "report": {
14737
+ const reportType = input.report_type ?? "summary";
14738
+ const period = input.period !== void 0 ? { preset: input.period } : input.from !== void 0 ? {
14739
+ from: input.from,
14740
+ to: input.to
14741
+ } : void 0;
14742
+ focus = { url: withQuery(`${workspaceRoot}/reports/${reportType}`, { pe: period ? JSON.stringify(period) : void 0 }) };
14743
+ break;
14744
+ }
14745
+ case "member":
14746
+ focus = { url: `${workspaceRoot}/members/${input.id}${input.tab ? `/${input.tab}` : ""}` };
14747
+ track = trackBase ? {
14748
+ url: `${trackBase}/organization/${context.organizationId}/members/${input.id}/time-off`,
14749
+ note: input.tab === "time-off" ? void 0 : "Track has no member profile page; this is the member's Track time-off page."
14750
+ } : {
14751
+ url: null,
14752
+ note: `No Track host is known for ${new URL(origin).hostname}.`
14753
+ };
14754
+ break;
14755
+ }
14756
+ return {
14757
+ entity: input.entity,
14758
+ organization_id: context.organizationId,
14759
+ workspace_id: context.workspaceId,
14760
+ focus,
14761
+ track
14762
+ };
14763
+ }
14764
+ const deepLinkOperations = [{
14765
+ id: "focus.deep-links.get",
14766
+ family: "focus",
14767
+ resource: "deep-links",
14768
+ action: "get",
14769
+ title: "Get deep links",
14770
+ description: "Build Toggl 2.0 web URLs (and Track URLs where IDs map) for a task, project, time entry, calendar day, report or member. Read-only; makes no API calls.",
14771
+ agentGuidance: "member id is the organization user ID. time_entry needs task_id to open the entry itself. report_type defaults to summary; set period (preset) or from/to (YYYY-MM-DD) for a date range. track.url is null with a note when the IDs do not map to Track.",
14772
+ safety: "read",
14773
+ destructive: false,
14774
+ cli: {
14775
+ group: [],
14776
+ command: "deep-link",
14777
+ interactive: "hidden",
14778
+ examples: [{
14779
+ description: "Link to a task",
14780
+ data: {
14781
+ entity: "task",
14782
+ id: 123
14783
+ }
14784
+ }, {
14785
+ description: "Link to last month's detailed report",
14786
+ data: {
14787
+ entity: "report",
14788
+ report_type: "detailed",
14789
+ period: "prevMonth"
14790
+ }
14791
+ }]
14792
+ },
14793
+ mcp: { entityTool: "deep-links" },
14794
+ inputSchema: DeepLinkInputSchema,
14795
+ execute: (input, { client }) => {
14796
+ const deepLinkInput = input;
14797
+ const error = deepLinkInputError(deepLinkInput);
14798
+ if (error) return Promise.resolve({
14799
+ ok: false,
14800
+ status: 400,
14801
+ message: error
14802
+ });
14803
+ return client.runGeneratedRequest("getDeepLinks", () => Promise.resolve(buildDeepLinks(deepLinkInput, {
14804
+ focusBaseUrl: client.focusBaseUrl,
14805
+ organizationId: client.organizationId,
14806
+ workspaceId: client.workspaceIdNumber
14807
+ })));
14808
+ }
14809
+ }];
14587
14810
  const dateRangeDay = /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ regex(/^\d{4}-\d{2}-\d{2}$/, "must be YYYY-MM-DD"));
14588
14811
  const TimeOffMeUpdateInputSchema = /* @__PURE__ */ intersect([/* @__PURE__ */ object$2({ timeoff_id: /* @__PURE__ */ number$2() }), PublicMeEntryRequestSchema]);
14589
14812
  const emptySchema = /* @__PURE__ */ object$2({});
@@ -30264,7 +30487,11 @@ function applyOverrides(operation) {
30264
30487
  }
30265
30488
  };
30266
30489
  }
30267
- const operations = [...generatedFocusOperations.map((operation) => applyOverrides(operation)), ...orgSharedOperations];
30490
+ const operations = [
30491
+ ...generatedFocusOperations.map((operation) => applyOverrides(operation)),
30492
+ ...orgSharedOperations,
30493
+ ...deepLinkOperations
30494
+ ];
30268
30495
  function visibleOperations() {
30269
30496
  return operations.filter((operation) => !operation.hidden);
30270
30497
  }
@@ -31936,4 +32163,4 @@ Common commands:
31936
32163
  //#endregion
31937
32164
  export { CommanderError as a, shutdownCliTelemetry as i, captureCliException as n, initCliTelemetry as r, createProgram as t };
31938
32165
 
31939
- //# sourceMappingURL=program-CzWFOKGE.js.map
32166
+ //# sourceMappingURL=program-BYXXg7fB.js.map
package/build/program.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as createProgram } from "./program-CzWFOKGE.js";
1
+ import { t as createProgram } from "./program-BYXXg7fB.js";
2
2
  export { createProgram };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@togglhq/cli",
3
- "version": "1.13.139",
3
+ "version": "1.13.141",
4
4
  "description": "Toggl CLI for Toggl 2.0 API operations.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -56,7 +56,7 @@
56
56
  "devDependencies": {
57
57
  "@toggl/cli-core": "workspace:^",
58
58
  "@toggl/operations": "workspace:^",
59
- "@toggl/queries": "2.2.294",
59
+ "@toggl/queries": "2.2.295",
60
60
  "@types/node": "22.19.11",
61
61
  "tsdown": "0.21.8",
62
62
  "typescript": "5.9.3",