@togglhq/mcp 1.5.52 → 1.5.54

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as runMcpCli } from "./src-DlNhcMHm.js";
2
+ import { n as runMcpCli } from "./src-CNv9MmYv.js";
3
3
  //#region src/cli.ts
4
4
  runMcpCli();
5
5
  //#endregion
package/build/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { n as runMcpCli, t as bootstrapServer } from "./src-DlNhcMHm.js";
2
+ import { n as runMcpCli, t as bootstrapServer } from "./src-CNv9MmYv.js";
3
3
  export { bootstrapServer, runMcpCli };
@@ -28347,6 +28347,31 @@ function getFallback(schema, dataset, config$1) {
28347
28347
  return typeof schema.fallback === "function" ? schema.fallback(dataset, config$1) : schema.fallback;
28348
28348
  }
28349
28349
  /**
28350
+ * Returns a fallback value as output if the input does not match the schema.
28351
+ *
28352
+ * @param schema The schema to catch.
28353
+ * @param fallback The fallback value.
28354
+ *
28355
+ * @returns The passed schema.
28356
+ */
28357
+ /* @__NO_SIDE_EFFECTS__ */
28358
+ function fallback(schema, fallback$1) {
28359
+ return {
28360
+ ...schema,
28361
+ fallback: fallback$1,
28362
+ get "~standard"() {
28363
+ return /* @__PURE__ */ _getStandardProps(this);
28364
+ },
28365
+ "~run"(dataset, config$1) {
28366
+ const outputDataset = schema["~run"](dataset, config$1);
28367
+ return outputDataset.issues ? {
28368
+ typed: true,
28369
+ value: /* @__PURE__ */ getFallback(this, outputDataset, config$1)
28370
+ } : outputDataset;
28371
+ }
28372
+ };
28373
+ }
28374
+ /**
28350
28375
  * Returns the default value of the schema.
28351
28376
  *
28352
28377
  * @param schema The schema to get it from.
@@ -28917,6 +28942,7 @@ const TagLiteSchema = /* @__PURE__ */ object({
28917
28942
  color: /* @__PURE__ */ optional(/* @__PURE__ */ string())
28918
28943
  });
28919
28944
  const TaskSchema = /* @__PURE__ */ object({
28945
+ allocation_unit: /* @__PURE__ */ picklist(["percent", "flat"]),
28920
28946
  created_at: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoDateTime()),
28921
28947
  estimate_type: /* @__PURE__ */ picklist(["daily", "total"]),
28922
28948
  id: /* @__PURE__ */ number(),
@@ -28967,6 +28993,7 @@ const TaskSchema = /* @__PURE__ */ object({
28967
28993
  updated_at: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoDateTime()))
28968
28994
  });
28969
28995
  const TaskWithParentAndAggregationsSchema = /* @__PURE__ */ object({
28996
+ allocation_unit: /* @__PURE__ */ picklist(["percent", "flat"]),
28970
28997
  created_at: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoDateTime()),
28971
28998
  estimate_type: /* @__PURE__ */ picklist(["daily", "total"]),
28972
28999
  id: /* @__PURE__ */ number(),
@@ -29505,6 +29532,7 @@ const TagPayloadSchema = /* @__PURE__ */ object({
29505
29532
  const TaskBulkArchivePayloadSchema = /* @__PURE__ */ object({ task_ids: /* @__PURE__ */ pipe(/* @__PURE__ */ array(/* @__PURE__ */ number()), /* @__PURE__ */ minLength(1), /* @__PURE__ */ maxLength(100)) });
29506
29533
  const TaskCreatePayloadSchema = /* @__PURE__ */ object({
29507
29534
  name: /* @__PURE__ */ string(),
29535
+ allocation_unit: /* @__PURE__ */ optional(/* @__PURE__ */ fallback(/* @__PURE__ */ picklist(["percent", "flat"]), "flat")),
29508
29536
  assignee_user_ids: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ array(/* @__PURE__ */ number()))),
29509
29537
  auto_log_time: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
29510
29538
  billable: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
@@ -29544,6 +29572,7 @@ const TaskBulkDuplicatePayloadSchema = /* @__PURE__ */ object({
29544
29572
  const TaskBulkRestorePayloadSchema = /* @__PURE__ */ object({ task_ids: /* @__PURE__ */ pipe(/* @__PURE__ */ array(/* @__PURE__ */ number()), /* @__PURE__ */ minLength(1), /* @__PURE__ */ maxLength(100)) });
29545
29573
  const TaskBulkUnarchivePayloadSchema = /* @__PURE__ */ object({ task_ids: /* @__PURE__ */ pipe(/* @__PURE__ */ array(/* @__PURE__ */ number()), /* @__PURE__ */ minLength(1), /* @__PURE__ */ maxLength(100)) });
29546
29574
  const TaskPartialUpdatePayloadSchema = /* @__PURE__ */ object({
29575
+ allocation_unit: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ picklist(["percent", "flat"]))),
29547
29576
  assignee_user_ids: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ array(/* @__PURE__ */ number()))),
29548
29577
  auto_log_time: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ boolean())),
29549
29578
  billable: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
@@ -29578,6 +29607,7 @@ const TaskPartialUpdatePayloadSchema = /* @__PURE__ */ object({
29578
29607
  });
29579
29608
  const TaskPartialUpdatePayloadWithIDSchema = /* @__PURE__ */ object({
29580
29609
  id: /* @__PURE__ */ number(),
29610
+ allocation_unit: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ picklist(["percent", "flat"]))),
29581
29611
  assignee_user_ids: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ array(/* @__PURE__ */ number()))),
29582
29612
  auto_log_time: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ boolean())),
29583
29613
  billable: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
@@ -34169,6 +34199,17 @@ async function capacityGetComputations(httpClient, organization_id, workspace_id
34169
34199
  }).json();
34170
34200
  }
34171
34201
  //#endregion
34202
+ //#region ../focus-queries/dist/capacity-settings/requests.ts
34203
+ async function getCapacitySettings(httpClient, workspace_id, signal) {
34204
+ return await httpClient.get(`workspaces/${workspace_id}/capacity-settings`, { signal }).json();
34205
+ }
34206
+ async function updateCapacitySettings(httpClient, workspace_id, data, signal) {
34207
+ return await httpClient.patch(`workspaces/${workspace_id}/capacity-settings`, {
34208
+ signal,
34209
+ json: data
34210
+ }).json();
34211
+ }
34212
+ //#endregion
34172
34213
  //#region ../focus-queries/dist/composite/requests.ts
34173
34214
  async function compositeCreateProject(httpClient, organization_id, workspace_id, data, signal) {
34174
34215
  return await httpClient.post(`organizations/${organization_id}/workspaces/${workspace_id}/composite/projects`, {
@@ -35316,6 +35357,54 @@ const generatedFocusOperations = [
35316
35357
  ]));
35317
35358
  }
35318
35359
  },
35360
+ {
35361
+ id: "focus.capacities.settings-list",
35362
+ family: "focus",
35363
+ resource: "capacities",
35364
+ action: "settings-list",
35365
+ title: "Settings List Capacities",
35366
+ description: "Settings List Capacities.",
35367
+ safety: "read",
35368
+ destructive: false,
35369
+ cli: {
35370
+ group: ["capacities", "settings"],
35371
+ command: "list",
35372
+ interactive: "hidden"
35373
+ },
35374
+ mcp: { entityTool: "capacities" },
35375
+ inputSchema: /* @__PURE__ */ looseObject({}),
35376
+ execute: (_input, { client }) => client.runGeneratedRequest("getCapacitySettings", () => callGeneratedRequest(getCapacitySettings, [
35377
+ client.httpClient,
35378
+ client.workspaceIdNumber,
35379
+ void 0
35380
+ ]))
35381
+ },
35382
+ {
35383
+ id: "focus.capacities.settings-update",
35384
+ family: "focus",
35385
+ resource: "capacities",
35386
+ action: "settings-update",
35387
+ title: "Settings Update Capacities",
35388
+ description: "Settings Update Capacities.",
35389
+ safety: "update",
35390
+ destructive: false,
35391
+ cli: {
35392
+ group: ["capacities", "settings"],
35393
+ command: "update",
35394
+ interactive: "default"
35395
+ },
35396
+ mcp: { entityTool: "capacities" },
35397
+ inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({ public_holidays_enabled: /* @__PURE__ */ boolean$1() }) }),
35398
+ execute: (input, { client }) => {
35399
+ const data = input;
35400
+ return client.runGeneratedRequest("updateCapacitySettings", () => callGeneratedRequest(updateCapacitySettings, [
35401
+ client.httpClient,
35402
+ client.workspaceIdNumber,
35403
+ data.payload ?? data.data ?? data,
35404
+ void 0
35405
+ ]));
35406
+ }
35407
+ },
35319
35408
  {
35320
35409
  id: "focus.clients.create",
35321
35410
  family: "focus",
@@ -35547,6 +35636,7 @@ const generatedFocusOperations = [
35547
35636
  inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({
35548
35637
  task: /* @__PURE__ */ looseObject({
35549
35638
  name: /* @__PURE__ */ string$1(),
35639
+ allocation_unit: /* @__PURE__ */ optional$1(/* @__PURE__ */ picklist$1(["percent", "flat"])),
35550
35640
  auto_log_time: /* @__PURE__ */ optional$1(/* @__PURE__ */ boolean$1()),
35551
35641
  billable: /* @__PURE__ */ optional$1(/* @__PURE__ */ boolean$1()),
35552
35642
  color: /* @__PURE__ */ optional$1(/* @__PURE__ */ string$1()),
@@ -35575,6 +35665,7 @@ const generatedFocusOperations = [
35575
35665
  }),
35576
35666
  subtasks: /* @__PURE__ */ optional$1(/* @__PURE__ */ array$1(/* @__PURE__ */ looseObject({
35577
35667
  name: /* @__PURE__ */ string$1(),
35668
+ allocation_unit: /* @__PURE__ */ optional$1(/* @__PURE__ */ picklist$1(["percent", "flat"])),
35578
35669
  auto_log_time: /* @__PURE__ */ optional$1(/* @__PURE__ */ boolean$1()),
35579
35670
  billable: /* @__PURE__ */ optional$1(/* @__PURE__ */ boolean$1()),
35580
35671
  color: /* @__PURE__ */ optional$1(/* @__PURE__ */ string$1()),
@@ -45726,7 +45817,7 @@ import_main.default.config({
45726
45817
  quiet: true,
45727
45818
  ignore: ["MISSING_ENV_FILE"]
45728
45819
  });
45729
- const packageVersion = "1.5.52";
45820
+ const packageVersion = "1.5.54";
45730
45821
  function resolvePublicUrls() {
45731
45822
  return {
45732
45823
  focusApiUrl: process.env.TOGGL_FOCUS_API_URL ?? "https://focus.toggl.com",
@@ -45791,4 +45882,4 @@ function bootstrapServer(options = {}) {
45791
45882
  //#endregion
45792
45883
  export { runMcpCli as n, bootstrapServer as t };
45793
45884
 
45794
- //# sourceMappingURL=src-DlNhcMHm.js.map
45885
+ //# sourceMappingURL=src-CNv9MmYv.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@togglhq/mcp",
3
- "version": "1.5.52",
3
+ "version": "1.5.54",
4
4
  "description": "Toggl 2.0 MCP server for Claude Code, Claude Desktop, and other MCP clients.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",