@togglhq/cli 1.6.16 → 1.7.1

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 CommanderError, t as createProgram } from "./program-DskwjJUv.js";
2
+ import { n as CommanderError, t as createProgram } from "./program-BJrl7qqO.js";
3
3
  //#region src/cli.ts
4
4
  try {
5
5
  await createProgram({ enableUpdateNotification: true }).parseAsync(process.argv);
package/build/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as createProgram } from "./program-DskwjJUv.js";
1
+ import { t as createProgram } from "./program-BJrl7qqO.js";
2
2
  export { createProgram };
@@ -5626,6 +5626,46 @@ function minValue$1(requirement, message$1) {
5626
5626
  }
5627
5627
  };
5628
5628
  }
5629
+ /**
5630
+ * Checks if a dataset is partially typed.
5631
+ *
5632
+ * @param dataset The dataset to check.
5633
+ * @param paths The paths to check.
5634
+ *
5635
+ * @returns Whether it is partially typed.
5636
+ *
5637
+ * @internal
5638
+ */
5639
+ /* @__NO_SIDE_EFFECTS__ */
5640
+ function _isPartiallyTyped(dataset, paths) {
5641
+ if (dataset.issues) for (const path of paths) for (const issue of dataset.issues) {
5642
+ let typed = false;
5643
+ const bound = Math.min(path.length, issue.path?.length ?? 0);
5644
+ for (let index = 0; index < bound; index++) if (path[index] !== issue.path[index].key && (path[index] !== "$" || issue.path[index].type !== "array")) {
5645
+ typed = true;
5646
+ break;
5647
+ }
5648
+ if (!typed) return false;
5649
+ }
5650
+ return true;
5651
+ }
5652
+ /* @__NO_SIDE_EFFECTS__ */
5653
+ function partialCheck(paths, requirement, message$1) {
5654
+ return {
5655
+ kind: "validation",
5656
+ type: "partial_check",
5657
+ reference: partialCheck,
5658
+ async: false,
5659
+ expects: null,
5660
+ paths,
5661
+ requirement,
5662
+ message: message$1,
5663
+ "~run"(dataset, config$1) {
5664
+ if ((dataset.typed || /* @__PURE__ */ _isPartiallyTyped(dataset, paths)) && !this.requirement(dataset.value)) _addIssue$1(this, "input", dataset, config$1);
5665
+ return dataset;
5666
+ }
5667
+ };
5668
+ }
5629
5669
  /* @__NO_SIDE_EFFECTS__ */
5630
5670
  function regex(requirement, message$1) {
5631
5671
  return {
@@ -5643,6 +5683,24 @@ function regex(requirement, message$1) {
5643
5683
  };
5644
5684
  }
5645
5685
  /**
5686
+ * Creates a to upper case transformation action.
5687
+ *
5688
+ * @returns A to upper case action.
5689
+ */
5690
+ /* @__NO_SIDE_EFFECTS__ */
5691
+ function toUpperCase() {
5692
+ return {
5693
+ kind: "transformation",
5694
+ type: "to_upper_case",
5695
+ reference: toUpperCase,
5696
+ async: false,
5697
+ "~run"(dataset) {
5698
+ dataset.value = dataset.value.toUpperCase();
5699
+ return dataset;
5700
+ }
5701
+ };
5702
+ }
5703
+ /**
5646
5704
  * Creates a custom transformation action.
5647
5705
  *
5648
5706
  * @param operation The transformation operation.
@@ -5664,6 +5722,24 @@ function transform(operation) {
5664
5722
  };
5665
5723
  }
5666
5724
  /**
5725
+ * Creates a trim transformation action.
5726
+ *
5727
+ * @returns A trim action.
5728
+ */
5729
+ /* @__NO_SIDE_EFFECTS__ */
5730
+ function trim() {
5731
+ return {
5732
+ kind: "transformation",
5733
+ type: "trim",
5734
+ reference: trim,
5735
+ async: false,
5736
+ "~run"(dataset) {
5737
+ dataset.value = dataset.value.trim();
5738
+ return dataset;
5739
+ }
5740
+ };
5741
+ }
5742
+ /**
5667
5743
  * Returns the fallback value of the schema.
5668
5744
  *
5669
5745
  * @param schema The schema to get it from.
@@ -5677,6 +5753,44 @@ function getFallback$1(schema, dataset, config$1) {
5677
5753
  return typeof schema.fallback === "function" ? schema.fallback(dataset, config$1) : schema.fallback;
5678
5754
  }
5679
5755
  /**
5756
+ * Forwards the issues of the passed validation action.
5757
+ *
5758
+ * @param action The validation action.
5759
+ * @param path The path to forward the issues to.
5760
+ *
5761
+ * @returns The modified action.
5762
+ */
5763
+ /* @__NO_SIDE_EFFECTS__ */
5764
+ function forward(action, path) {
5765
+ return {
5766
+ ...action,
5767
+ "~run"(dataset, config$1) {
5768
+ const prevIssues = dataset.issues && [...dataset.issues];
5769
+ dataset = action["~run"](dataset, config$1);
5770
+ if (dataset.issues) {
5771
+ for (const issue of dataset.issues) if (!prevIssues?.includes(issue)) {
5772
+ let pathInput = dataset.value;
5773
+ for (const key of path) {
5774
+ const pathValue = pathInput[key];
5775
+ const pathItem = {
5776
+ type: "unknown",
5777
+ origin: "value",
5778
+ input: pathInput,
5779
+ key,
5780
+ value: pathValue
5781
+ };
5782
+ if (issue.path) issue.path.push(pathItem);
5783
+ else issue.path = [pathItem];
5784
+ if (!pathValue) break;
5785
+ pathInput = pathValue;
5786
+ }
5787
+ }
5788
+ }
5789
+ return dataset;
5790
+ }
5791
+ };
5792
+ }
5793
+ /**
5680
5794
  * Returns the default value of the schema.
5681
5795
  *
5682
5796
  * @param schema The schema to get it from.
@@ -6130,6 +6244,87 @@ function record$1(key, value$1, message$1) {
6130
6244
  };
6131
6245
  }
6132
6246
  /* @__NO_SIDE_EFFECTS__ */
6247
+ function strictObject(entries$1, message$1) {
6248
+ return {
6249
+ kind: "schema",
6250
+ type: "strict_object",
6251
+ reference: strictObject,
6252
+ expects: "Object",
6253
+ async: false,
6254
+ entries: entries$1,
6255
+ message: message$1,
6256
+ get "~standard"() {
6257
+ return /* @__PURE__ */ _getStandardProps$1(this);
6258
+ },
6259
+ "~run"(dataset, config$1) {
6260
+ const input = dataset.value;
6261
+ if (input && typeof input === "object") {
6262
+ dataset.typed = true;
6263
+ dataset.value = {};
6264
+ for (const key in this.entries) {
6265
+ const valueSchema = this.entries[key];
6266
+ if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
6267
+ const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault$1(valueSchema);
6268
+ const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
6269
+ if (valueDataset.issues) {
6270
+ const pathItem = {
6271
+ type: "object",
6272
+ origin: "value",
6273
+ input,
6274
+ key,
6275
+ value: value$1
6276
+ };
6277
+ for (const issue of valueDataset.issues) {
6278
+ if (issue.path) issue.path.unshift(pathItem);
6279
+ else issue.path = [pathItem];
6280
+ dataset.issues?.push(issue);
6281
+ }
6282
+ if (!dataset.issues) dataset.issues = valueDataset.issues;
6283
+ if (config$1.abortEarly) {
6284
+ dataset.typed = false;
6285
+ break;
6286
+ }
6287
+ }
6288
+ if (!valueDataset.typed) dataset.typed = false;
6289
+ dataset.value[key] = valueDataset.value;
6290
+ } else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback$1(valueSchema);
6291
+ else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
6292
+ _addIssue$1(this, "key", dataset, config$1, {
6293
+ input: void 0,
6294
+ expected: `"${key}"`,
6295
+ path: [{
6296
+ type: "object",
6297
+ origin: "key",
6298
+ input,
6299
+ key,
6300
+ value: input[key]
6301
+ }]
6302
+ });
6303
+ if (config$1.abortEarly) break;
6304
+ }
6305
+ }
6306
+ if (!dataset.issues || !config$1.abortEarly) {
6307
+ for (const key in input) if (!(key in this.entries)) {
6308
+ _addIssue$1(this, "key", dataset, config$1, {
6309
+ input: key,
6310
+ expected: "never",
6311
+ path: [{
6312
+ type: "object",
6313
+ origin: "key",
6314
+ input,
6315
+ key,
6316
+ value: input[key]
6317
+ }]
6318
+ });
6319
+ break;
6320
+ }
6321
+ }
6322
+ } else _addIssue$1(this, "type", dataset, config$1);
6323
+ return dataset;
6324
+ }
6325
+ };
6326
+ }
6327
+ /* @__NO_SIDE_EFFECTS__ */
6133
6328
  function string$1(message$1) {
6134
6329
  return {
6135
6330
  kind: "schema",
@@ -10616,7 +10811,7 @@ const PublicMeEntryRequestSchema = /* @__PURE__ */ object$2({
10616
10811
  ]))
10617
10812
  });
10618
10813
  //#endregion
10619
- //#region ../../node_modules/.pnpm/@toggl+queries@2.1.194_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_cf1b2da807173ec251cc74d839ac4fe6/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
10814
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.212_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4c0aa64421be7eab39751554cfd6b93/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
10620
10815
  async function getInvitations(httpClient, signal) {
10621
10816
  return (await httpClient.get(`invitations`, { signal })).json();
10622
10817
  }
@@ -10633,7 +10828,7 @@ async function resendInvitation(httpClient, organization_id, organization_user_i
10633
10828
  return (await httpClient.post(`organizations/${organization_id}/invitations/${organization_user_id}/resend`, { signal })).json();
10634
10829
  }
10635
10830
  //#endregion
10636
- //#region ../../node_modules/.pnpm/@toggl+queries@2.1.194_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_cf1b2da807173ec251cc74d839ac4fe6/node_modules/@toggl/queries/dist/org/utils/requests.mjs
10831
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.212_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4c0aa64421be7eab39751554cfd6b93/node_modules/@toggl/queries/dist/org/utils/requests.mjs
10637
10832
  function buildSearchParams$1(params, flattenArrays = false) {
10638
10833
  const searchParams = new URLSearchParams();
10639
10834
  Object.entries(params).forEach(([key, value]) => {
@@ -10645,7 +10840,7 @@ function buildSearchParams$1(params, flattenArrays = false) {
10645
10840
  return searchParams;
10646
10841
  }
10647
10842
  //#endregion
10648
- //#region ../../node_modules/.pnpm/@toggl+queries@2.1.194_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_cf1b2da807173ec251cc74d839ac4fe6/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
10843
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.212_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4c0aa64421be7eab39751554cfd6b93/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
10649
10844
  async function getOrganizationUser(httpClient, organization_id, organization_user_id, signal) {
10650
10845
  return (await httpClient.get(`organizations/${organization_id}/users/${organization_user_id}`, { signal })).json();
10651
10846
  }
@@ -10659,7 +10854,7 @@ async function patchOrganizationUserActive(httpClient, organization_id, organiza
10659
10854
  return (await httpClient.patch(`organizations/${organization_id}/users/${organization_user_id}/active_status/${status}`, { signal })).json();
10660
10855
  }
10661
10856
  //#endregion
10662
- //#region ../../node_modules/.pnpm/@toggl+queries@2.1.194_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_cf1b2da807173ec251cc74d839ac4fe6/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
10857
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.212_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4c0aa64421be7eab39751554cfd6b93/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
10663
10858
  async function getWorkspaces(httpClient, organization_id, signal) {
10664
10859
  return (await httpClient.get(`organizations/${organization_id}/workspaces`, { signal })).json();
10665
10860
  }
@@ -10679,7 +10874,7 @@ const WorkingHoursUpdateInputSchema = /* @__PURE__ */ object$2({
10679
10874
  });
10680
10875
  const StatusOKSchema = /* @__PURE__ */ object$2({ status: /* @__PURE__ */ string$1() });
10681
10876
  //#endregion
10682
- //#region ../../node_modules/.pnpm/@toggl+queries@2.1.194_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_cf1b2da807173ec251cc74d839ac4fe6/node_modules/@toggl/queries/dist/shared-data/utils/requests.mjs
10877
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.212_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4c0aa64421be7eab39751554cfd6b93/node_modules/@toggl/queries/dist/shared-data/utils/requests.mjs
10683
10878
  const META_SYMBOL = Symbol.for("querygen:response:meta");
10684
10879
  function withResponseMeta(data, headers, status) {
10685
10880
  if (!data) return data;
@@ -10706,7 +10901,7 @@ function buildSearchParams(params, flattenArrays = false) {
10706
10901
  return searchParams;
10707
10902
  }
10708
10903
  //#endregion
10709
- //#region ../../node_modules/.pnpm/@toggl+queries@2.1.194_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_cf1b2da807173ec251cc74d839ac4fe6/node_modules/@toggl/queries/dist/shared-data/public-holidays/requests.mjs
10904
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.212_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4c0aa64421be7eab39751554cfd6b93/node_modules/@toggl/queries/dist/shared-data/public-holidays/requests.mjs
10710
10905
  async function getPublicHolidays(httpClient, year, { country, organization_id } = {}, signal) {
10711
10906
  const response = await httpClient.get(`shared_data/api/publicholidays/${year}`, {
10712
10907
  signal,
@@ -10718,12 +10913,12 @@ async function getPublicHolidays(httpClient, year, { country, organization_id }
10718
10913
  return withResponseMeta(await response.json(), response.headers, response.status);
10719
10914
  }
10720
10915
  //#endregion
10721
- //#region ../../node_modules/.pnpm/@toggl+queries@2.1.194_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_cf1b2da807173ec251cc74d839ac4fe6/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
10916
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.212_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4c0aa64421be7eab39751554cfd6b93/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
10722
10917
  async function getStatus(httpClient, signal) {
10723
10918
  return (await httpClient.get(`shared_data/api/status`, { signal })).json();
10724
10919
  }
10725
10920
  //#endregion
10726
- //#region ../../node_modules/.pnpm/@toggl+queries@2.1.194_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_cf1b2da807173ec251cc74d839ac4fe6/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
10921
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.212_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4c0aa64421be7eab39751554cfd6b93/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
10727
10922
  async function timeoffListMyEntries(httpClient, organization_id, { from, to }, signal) {
10728
10923
  return (await httpClient.get(`timeoff/organizations/${organization_id}/me`, {
10729
10924
  signal,
@@ -10751,7 +10946,7 @@ async function timeoffDeleteMyEntry(httpClient, organization_id, id, signal) {
10751
10946
  return response.json();
10752
10947
  }
10753
10948
  //#endregion
10754
- //#region ../../node_modules/.pnpm/@toggl+queries@2.1.194_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_cf1b2da807173ec251cc74d839ac4fe6/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
10949
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.212_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4c0aa64421be7eab39751554cfd6b93/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
10755
10950
  async function getMyWorkingHours(httpClient, organization_id, signal) {
10756
10951
  return (await httpClient.get(`shared_data/api/workinghours/${organization_id}/me`, { signal })).json();
10757
10952
  }
@@ -12494,7 +12689,7 @@ async function runSkillSetup(options) {
12494
12689
  });
12495
12690
  }
12496
12691
  //#endregion
12497
- //#region ../operations/build/safety-DUCLJgdI.js
12692
+ //#region ../operations/build/validation-v3-RQf0k.js
12498
12693
  const optionalNumber = /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2());
12499
12694
  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})`)));
12500
12695
  const perPageSchema = perPageField(100);
@@ -12502,6 +12697,13 @@ const orgUserPerPageSchema = perPageField(200);
12502
12697
  const DATE_FIELD_RE = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2}))?$/;
12503
12698
  const dateField = (description) => /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ regex(DATE_FIELD_RE, "must be YYYY-MM-DD or RFC3339 datetime (e.g. '2025-01-01' or '2025-01-01T00:00:00Z')"), /* @__PURE__ */ description$1(description));
12504
12699
  const apiDateTimeString = /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoTimestamp());
12700
+ const rateDateSchema = /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1());
12701
+ const rateSchedulePayloadSchema = /* @__PURE__ */ pipe$2(/* @__PURE__ */ strictObject({
12702
+ currency: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ trim(), /* @__PURE__ */ toUpperCase(), /* @__PURE__ */ regex(/^[A-Z]{3}$/, "must be exactly three A-Z letters")),
12703
+ hourly_rate: /* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ minValue$1(0)),
12704
+ start_date: rateDateSchema,
12705
+ end_date: /* @__PURE__ */ optional$1(rateDateSchema)
12706
+ }), /* @__PURE__ */ forward(/* @__PURE__ */ partialCheck([["start_date"], ["end_date"]], ({ start_date, end_date }) => end_date === void 0 || end_date >= start_date, "must be on or after start_date"), ["end_date"]));
12505
12707
  const tagIdFilterSchema = /* @__PURE__ */ union([/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ transform((tagId) => [tagId])), /* @__PURE__ */ pipe$2(/* @__PURE__ */ array$1(/* @__PURE__ */ number$2()), /* @__PURE__ */ minLength$1(1))]);
12506
12708
  const timeBlockListSchema = /* @__PURE__ */ object$2({
12507
12709
  date_from: dateField("Range start — date-only (e.g. '2025-01-01') or RFC3339 datetime. Date-only is expanded to T00:00:00Z."),
@@ -12738,10 +12940,58 @@ const clientOverrides = { "focus.clients.list": {
12738
12940
  }],
12739
12941
  aliases: ["ls"]
12740
12942
  } };
12943
+ const RATE_CONFLICT_CHECK = {
12944
+ safety: "read",
12945
+ destructive: false
12946
+ };
12947
+ const RATE_SCHEDULE_GUIDANCE = "hourly_rate is in the currency's smallest unit, so it depends on the currency: two-decimal currencies like USD/EUR use cents (5000 = 50.00), zero-decimal ones like JPY/KRW use whole units (5000 = 5000), three-decimal ones like KWD/BHD use thousandths. Reads return the same unit. Omit end_date for an open-ended schedule; when set it must be on or after start_date.";
12948
+ const rateOverrides = {
12949
+ "focus.rates.create-project": { mcp: { entityTool: void 0 } },
12950
+ "focus.rates.billable-check-project-billable-rate-conflicts": {
12951
+ ...RATE_CONFLICT_CHECK,
12952
+ agentGuidance: RATE_SCHEDULE_GUIDANCE
12953
+ },
12954
+ "focus.rates.billable-check-project-user-billable-rate-conflicts": {
12955
+ ...RATE_CONFLICT_CHECK,
12956
+ agentGuidance: RATE_SCHEDULE_GUIDANCE
12957
+ },
12958
+ "focus.rates.billable-check-workspace-billable-rate-conflicts": {
12959
+ ...RATE_CONFLICT_CHECK,
12960
+ agentGuidance: RATE_SCHEDULE_GUIDANCE
12961
+ },
12962
+ "focus.rates.billable-check-workspace-user-billable-rate-conflicts": {
12963
+ ...RATE_CONFLICT_CHECK,
12964
+ agentGuidance: RATE_SCHEDULE_GUIDANCE
12965
+ },
12966
+ "focus.rates.billable-upsert-project": { agentGuidance: RATE_SCHEDULE_GUIDANCE },
12967
+ "focus.rates.billable-upsert-project-user": { agentGuidance: RATE_SCHEDULE_GUIDANCE },
12968
+ "focus.rates.billable-upsert-workspace": { agentGuidance: RATE_SCHEDULE_GUIDANCE },
12969
+ "focus.rates.billable-upsert-workspace-user": { agentGuidance: RATE_SCHEDULE_GUIDANCE },
12970
+ "focus.rates.labor-check-project-labor-cost-conflicts": {
12971
+ ...RATE_CONFLICT_CHECK,
12972
+ agentGuidance: RATE_SCHEDULE_GUIDANCE
12973
+ },
12974
+ "focus.rates.labor-check-project-user-labor-cost-conflicts": {
12975
+ ...RATE_CONFLICT_CHECK,
12976
+ agentGuidance: RATE_SCHEDULE_GUIDANCE
12977
+ },
12978
+ "focus.rates.labor-check-workspace-labor-cost-conflicts": {
12979
+ ...RATE_CONFLICT_CHECK,
12980
+ agentGuidance: RATE_SCHEDULE_GUIDANCE
12981
+ },
12982
+ "focus.rates.labor-check-workspace-user-labor-cost-conflicts": {
12983
+ ...RATE_CONFLICT_CHECK,
12984
+ agentGuidance: RATE_SCHEDULE_GUIDANCE
12985
+ },
12986
+ "focus.rates.labor-upsert-project-labor-cost-rate": { agentGuidance: RATE_SCHEDULE_GUIDANCE },
12987
+ "focus.rates.labor-upsert-project-user-labor-cost-rate": { agentGuidance: RATE_SCHEDULE_GUIDANCE },
12988
+ "focus.rates.labor-upsert-workspace-labor-cost-rate": { agentGuidance: RATE_SCHEDULE_GUIDANCE },
12989
+ "focus.rates.labor-upsert-workspace-user-labor-cost-rate": { agentGuidance: RATE_SCHEDULE_GUIDANCE }
12990
+ };
12741
12991
  const compositeOverrides = {
12742
12992
  "focus.composite.create-project": {
12743
12993
  description: "Create a project with related data such as members, milestones, rates, and billable rates.",
12744
- agentGuidance: "Follow the create action's privacy and billable guidance. Project fields go under payload.project.",
12994
+ agentGuidance: `Follow the create action's privacy and billable guidance. Project fields go under payload.project. Set rates through payload.billable_rates, not the legacy payload.rates (start_at/end_at). For payload.billable_rates: ${RATE_SCHEDULE_GUIDANCE}`,
12745
12995
  cli: {
12746
12996
  group: ["projects"],
12747
12997
  command: "create-advanced",
@@ -13108,6 +13358,18 @@ const projectOverrides = {
13108
13358
  }
13109
13359
  };
13110
13360
  const publicHolidayOverrides = { "focus.public-holidays.get-by-user-ids": { cli: { interactive: "hidden" } } };
13361
+ const readOnlyPostOverrides = Object.fromEntries([
13362
+ "focus.reports.get-flexq-data",
13363
+ "focus.reports.get-flexq-dictionary",
13364
+ "focus.reports.get-workload",
13365
+ "focus.tasks.suggestions-get-project-suggestion-for-atask",
13366
+ "focus.tasks.suggestions-get-project-suggestions-for-multiple-tasks",
13367
+ "focus.time-log-suggestions.get-for-acalendar-event-title",
13368
+ "focus.time-log-suggestions.get-for-multiple-calendar-event-titles"
13369
+ ].map((id) => [id, {
13370
+ safety: "read",
13371
+ destructive: false
13372
+ }]));
13111
13373
  const savedViewOverrides = {
13112
13374
  "focus.saved-views.list": {
13113
13375
  agentGuidance: "Saved views are per-user, so results belong to the authenticated user. Filter by type (inbox, archive, board, timeline, project, project.tasks, project.board, project.timeline, projects) or by partial name match. pinned=true entries are the user's starred views.",
@@ -13881,6 +14143,41 @@ const orgSharedOperations = [
13881
14143
  function operationRequiresExplicitAcknowledgment(operation) {
13882
14144
  return operation.destructive;
13883
14145
  }
14146
+ const MAX_ERROR_LENGTH = 200;
14147
+ const MAX_RECEIVED_LENGTH = 40;
14148
+ function formatIssueMessage(issue) {
14149
+ if (issue.message.includes("but received undefined")) return "required";
14150
+ if (issue.received.length <= MAX_RECEIVED_LENGTH) return issue.message;
14151
+ const index = issue.message.lastIndexOf(issue.received);
14152
+ if (index === -1) return issue.message;
14153
+ const closer = issue.received.startsWith("\"") && issue.received.endsWith("\"") ? "\"" : "";
14154
+ const received = `${issue.received.slice(0, MAX_RECEIVED_LENGTH - 3 - closer.length)}...${closer}`;
14155
+ return issue.message.slice(0, index) + received + issue.message.slice(index + issue.received.length);
14156
+ }
14157
+ function formatValibotError(issues, maxLength = MAX_ERROR_LENGTH) {
14158
+ const messages = issues.map((issue) => {
14159
+ const path = issue.path?.map((segment) => String(segment.key)).join(".") ?? "";
14160
+ const message = formatIssueMessage(issue);
14161
+ return path ? `${path}: ${message}` : message;
14162
+ });
14163
+ if (messages.length === 0) return "";
14164
+ const separators = (messages.length - 1) * 2;
14165
+ if (messages.reduce((sum, message) => sum + message.length, separators) <= maxLength) return messages.join("; ");
14166
+ let included = 0;
14167
+ let length = 0;
14168
+ for (const message of messages) {
14169
+ const next = length + (included === 0 ? 0 : 2) + message.length;
14170
+ if (next + `; (+${messages.length - included - 1} more)`.length > maxLength) break;
14171
+ length = next;
14172
+ included += 1;
14173
+ }
14174
+ if (included === 0) {
14175
+ const suffix = messages.length > 1 ? `; (+${messages.length - 1} more)` : "";
14176
+ if (suffix.length >= maxLength) return messages[0].slice(0, Math.max(maxLength, 1));
14177
+ return messages[0].slice(0, maxLength - suffix.length) + suffix;
14178
+ }
14179
+ return [...messages.slice(0, included), `(+${messages.length - included} more)`].join("; ");
14180
+ }
13884
14181
  //#endregion
13885
14182
  //#region ../focus-queries/dist/audit-log/requests.ts
13886
14183
  async function getAuditLog(httpClient, organization_id, workspace_id, from, to, { entity_type, entity_id, action, user_id, page_size, page_number, export: export_ } = {}, signal) {
@@ -14500,14 +14797,17 @@ async function updateASavedView(httpClient, workspace_id, id, data, signal) {
14500
14797
  }
14501
14798
  //#endregion
14502
14799
  //#region ../focus-queries/dist/search/requests.ts
14503
- async function search(httpClient, organization_id, workspace_id, { keyword, per_group, assignee_user_id, include_drafts }, signal) {
14800
+ async function search(httpClient, organization_id, workspace_id, { keyword, per_group, assignee_user_id, project_id, task_id, include_drafts, exclude_calendar_events }, signal) {
14504
14801
  return await httpClient.get(`organizations/${organization_id}/workspaces/${workspace_id}/search`, {
14505
14802
  signal,
14506
14803
  searchParams: buildSearchParams$3({
14507
14804
  keyword,
14508
14805
  per_group,
14509
14806
  assignee_user_id,
14510
- include_drafts
14807
+ project_id,
14808
+ task_id,
14809
+ include_drafts,
14810
+ exclude_calendar_events
14511
14811
  })
14512
14812
  }).json();
14513
14813
  }
@@ -15057,7 +15357,7 @@ const generatedFocusOperations = [
15057
15357
  action: "get-computations",
15058
15358
  title: "Get Computations Capacities",
15059
15359
  description: "Get Computations Capacities.",
15060
- safety: "update",
15360
+ safety: "read",
15061
15361
  destructive: false,
15062
15362
  cli: {
15063
15363
  group: ["capacities"],
@@ -15263,12 +15563,7 @@ const generatedFocusOperations = [
15263
15563
  rrule: /* @__PURE__ */ optional$1(/* @__PURE__ */ string$1()),
15264
15564
  start_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
15265
15565
  }),
15266
- billable_rates: /* @__PURE__ */ optional$1(/* @__PURE__ */ array$1(/* @__PURE__ */ looseObject({
15267
- currency: /* @__PURE__ */ string$1(),
15268
- hourly_rate: /* @__PURE__ */ number$2(),
15269
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
15270
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
15271
- }))),
15566
+ billable_rates: /* @__PURE__ */ optional$1(/* @__PURE__ */ array$1(rateSchedulePayloadSchema)),
15272
15567
  members: /* @__PURE__ */ optional$1(/* @__PURE__ */ looseObject({
15273
15568
  role_id: /* @__PURE__ */ number$2(),
15274
15569
  group_ids: /* @__PURE__ */ optional$1(/* @__PURE__ */ array$1(/* @__PURE__ */ number$2())),
@@ -16691,12 +16986,12 @@ const generatedFocusOperations = [
16691
16986
  action: "complete",
16692
16987
  title: "Complete Projects",
16693
16988
  description: "Complete Projects.",
16694
- safety: "read",
16989
+ safety: "update",
16695
16990
  destructive: false,
16696
16991
  cli: {
16697
16992
  group: ["projects"],
16698
16993
  command: "complete",
16699
- interactive: "available"
16994
+ interactive: "default"
16700
16995
  },
16701
16996
  mcp: { entityTool: "projects" },
16702
16997
  inputSchema: /* @__PURE__ */ looseObject({ project_id: /* @__PURE__ */ number$2() }),
@@ -17355,12 +17650,12 @@ const generatedFocusOperations = [
17355
17650
  action: "pin",
17356
17651
  title: "Pin Projects",
17357
17652
  description: "Pin Projects.",
17358
- safety: "read",
17653
+ safety: "update",
17359
17654
  destructive: false,
17360
17655
  cli: {
17361
17656
  group: ["projects"],
17362
17657
  command: "pin",
17363
- interactive: "available"
17658
+ interactive: "default"
17364
17659
  },
17365
17660
  mcp: { entityTool: "projects" },
17366
17661
  inputSchema: /* @__PURE__ */ looseObject({ project_id: /* @__PURE__ */ number$2() }),
@@ -17382,12 +17677,12 @@ const generatedFocusOperations = [
17382
17677
  action: "remove-project-member",
17383
17678
  title: "Remove Project Member Projects",
17384
17679
  description: "Remove Project Member Projects.",
17385
- safety: "read",
17386
- destructive: false,
17680
+ safety: "delete",
17681
+ destructive: true,
17387
17682
  cli: {
17388
17683
  group: ["projects"],
17389
17684
  command: "remove-project-member",
17390
- interactive: "available"
17685
+ interactive: "default"
17391
17686
  },
17392
17687
  mcp: { entityTool: "projects" },
17393
17688
  inputSchema: /* @__PURE__ */ looseObject({
@@ -17470,12 +17765,12 @@ const generatedFocusOperations = [
17470
17765
  action: "uncomplete",
17471
17766
  title: "Uncomplete Projects",
17472
17767
  description: "Uncomplete Projects.",
17473
- safety: "read",
17768
+ safety: "update",
17474
17769
  destructive: false,
17475
17770
  cli: {
17476
17771
  group: ["projects"],
17477
17772
  command: "uncomplete",
17478
- interactive: "available"
17773
+ interactive: "default"
17479
17774
  },
17480
17775
  mcp: { entityTool: "projects" },
17481
17776
  inputSchema: /* @__PURE__ */ looseObject({ project_id: /* @__PURE__ */ number$2() }),
@@ -17497,12 +17792,12 @@ const generatedFocusOperations = [
17497
17792
  action: "unpin",
17498
17793
  title: "Unpin Projects",
17499
17794
  description: "Unpin Projects.",
17500
- safety: "read",
17501
- destructive: false,
17795
+ safety: "delete",
17796
+ destructive: true,
17502
17797
  cli: {
17503
17798
  group: ["projects"],
17504
17799
  command: "unpin",
17505
- interactive: "available"
17800
+ interactive: "default"
17506
17801
  },
17507
17802
  mcp: { entityTool: "projects" },
17508
17803
  inputSchema: /* @__PURE__ */ looseObject({ project_id: /* @__PURE__ */ number$2() }),
@@ -17668,21 +17963,16 @@ const generatedFocusOperations = [
17668
17963
  action: "billable-check-project-billable-rate-conflicts",
17669
17964
  title: "Billable Check Project Billable Rate Conflicts Rates",
17670
17965
  description: "Billable Check Project Billable Rate Conflicts Rates.",
17671
- safety: "read",
17966
+ safety: "update",
17672
17967
  destructive: false,
17673
17968
  cli: {
17674
17969
  group: ["rates", "billable"],
17675
17970
  command: "check-project-billable-rate-conflicts",
17676
- interactive: "available"
17971
+ interactive: "default"
17677
17972
  },
17678
17973
  mcp: { entityTool: "rates" },
17679
17974
  inputSchema: /* @__PURE__ */ looseObject({
17680
- payload: /* @__PURE__ */ looseObject({
17681
- currency: /* @__PURE__ */ string$1(),
17682
- hourly_rate: /* @__PURE__ */ number$2(),
17683
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
17684
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
17685
- }),
17975
+ payload: rateSchedulePayloadSchema,
17686
17976
  project_id: /* @__PURE__ */ number$2()
17687
17977
  }),
17688
17978
  execute: (input, { client }) => {
@@ -17704,21 +17994,16 @@ const generatedFocusOperations = [
17704
17994
  action: "billable-check-project-user-billable-rate-conflicts",
17705
17995
  title: "Billable Check Project User Billable Rate Conflicts Rates",
17706
17996
  description: "Billable Check Project User Billable Rate Conflicts Rates.",
17707
- safety: "read",
17997
+ safety: "update",
17708
17998
  destructive: false,
17709
17999
  cli: {
17710
18000
  group: ["rates", "billable"],
17711
18001
  command: "check-project-user-billable-rate-conflicts",
17712
- interactive: "available"
18002
+ interactive: "default"
17713
18003
  },
17714
18004
  mcp: { entityTool: "rates" },
17715
18005
  inputSchema: /* @__PURE__ */ looseObject({
17716
- payload: /* @__PURE__ */ looseObject({
17717
- currency: /* @__PURE__ */ string$1(),
17718
- hourly_rate: /* @__PURE__ */ number$2(),
17719
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
17720
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
17721
- }),
18006
+ payload: rateSchedulePayloadSchema,
17722
18007
  project_id: /* @__PURE__ */ number$2(),
17723
18008
  user_id: /* @__PURE__ */ number$2()
17724
18009
  }),
@@ -17742,20 +18027,15 @@ const generatedFocusOperations = [
17742
18027
  action: "billable-check-workspace-billable-rate-conflicts",
17743
18028
  title: "Billable Check Workspace Billable Rate Conflicts Rates",
17744
18029
  description: "Billable Check Workspace Billable Rate Conflicts Rates.",
17745
- safety: "read",
18030
+ safety: "update",
17746
18031
  destructive: false,
17747
18032
  cli: {
17748
18033
  group: ["rates", "billable"],
17749
18034
  command: "check-workspace-billable-rate-conflicts",
17750
- interactive: "available"
18035
+ interactive: "default"
17751
18036
  },
17752
18037
  mcp: { entityTool: "rates" },
17753
- inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({
17754
- currency: /* @__PURE__ */ string$1(),
17755
- hourly_rate: /* @__PURE__ */ number$2(),
17756
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
17757
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
17758
- }) }),
18038
+ inputSchema: /* @__PURE__ */ looseObject({ payload: rateSchedulePayloadSchema }),
17759
18039
  execute: (input, { client }) => {
17760
18040
  const data = input;
17761
18041
  return client.runGeneratedRequest("checkWorkspaceBillableRateConflicts", () => callGeneratedRequest(checkWorkspaceBillableRateConflicts, [
@@ -17774,21 +18054,16 @@ const generatedFocusOperations = [
17774
18054
  action: "billable-check-workspace-user-billable-rate-conflicts",
17775
18055
  title: "Billable Check Workspace User Billable Rate Conflicts Rates",
17776
18056
  description: "Billable Check Workspace User Billable Rate Conflicts Rates.",
17777
- safety: "read",
18057
+ safety: "update",
17778
18058
  destructive: false,
17779
18059
  cli: {
17780
18060
  group: ["rates", "billable"],
17781
18061
  command: "check-workspace-user-billable-rate-conflicts",
17782
- interactive: "available"
18062
+ interactive: "default"
17783
18063
  },
17784
18064
  mcp: { entityTool: "rates" },
17785
18065
  inputSchema: /* @__PURE__ */ looseObject({
17786
- payload: /* @__PURE__ */ looseObject({
17787
- currency: /* @__PURE__ */ string$1(),
17788
- hourly_rate: /* @__PURE__ */ number$2(),
17789
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
17790
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
17791
- }),
18066
+ payload: rateSchedulePayloadSchema,
17792
18067
  user_id: /* @__PURE__ */ number$2()
17793
18068
  }),
17794
18069
  execute: (input, { client }) => {
@@ -18192,12 +18467,7 @@ const generatedFocusOperations = [
18192
18467
  },
18193
18468
  mcp: { entityTool: "rates" },
18194
18469
  inputSchema: /* @__PURE__ */ looseObject({
18195
- payload: /* @__PURE__ */ looseObject({
18196
- currency: /* @__PURE__ */ string$1(),
18197
- hourly_rate: /* @__PURE__ */ number$2(),
18198
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
18199
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
18200
- }),
18470
+ payload: rateSchedulePayloadSchema,
18201
18471
  project_id: /* @__PURE__ */ number$2()
18202
18472
  }),
18203
18473
  execute: (input, { client }) => {
@@ -18228,12 +18498,7 @@ const generatedFocusOperations = [
18228
18498
  },
18229
18499
  mcp: { entityTool: "rates" },
18230
18500
  inputSchema: /* @__PURE__ */ looseObject({
18231
- payload: /* @__PURE__ */ looseObject({
18232
- currency: /* @__PURE__ */ string$1(),
18233
- hourly_rate: /* @__PURE__ */ number$2(),
18234
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
18235
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
18236
- }),
18501
+ payload: rateSchedulePayloadSchema,
18237
18502
  project_id: /* @__PURE__ */ number$2(),
18238
18503
  user_id: /* @__PURE__ */ number$2()
18239
18504
  }),
@@ -18265,12 +18530,7 @@ const generatedFocusOperations = [
18265
18530
  interactive: "default"
18266
18531
  },
18267
18532
  mcp: { entityTool: "rates" },
18268
- inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({
18269
- currency: /* @__PURE__ */ string$1(),
18270
- hourly_rate: /* @__PURE__ */ number$2(),
18271
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
18272
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
18273
- }) }),
18533
+ inputSchema: /* @__PURE__ */ looseObject({ payload: rateSchedulePayloadSchema }),
18274
18534
  execute: (input, { client }) => {
18275
18535
  const data = input;
18276
18536
  return client.runGeneratedRequest("upsertWorkspaceBillableRate", () => callGeneratedRequest(upsertWorkspaceBillableRate, [
@@ -18298,12 +18558,7 @@ const generatedFocusOperations = [
18298
18558
  },
18299
18559
  mcp: { entityTool: "rates" },
18300
18560
  inputSchema: /* @__PURE__ */ looseObject({
18301
- payload: /* @__PURE__ */ looseObject({
18302
- currency: /* @__PURE__ */ string$1(),
18303
- hourly_rate: /* @__PURE__ */ number$2(),
18304
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
18305
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
18306
- }),
18561
+ payload: rateSchedulePayloadSchema,
18307
18562
  user_id: /* @__PURE__ */ number$2()
18308
18563
  }),
18309
18564
  execute: (input, { client }) => {
@@ -18515,21 +18770,16 @@ const generatedFocusOperations = [
18515
18770
  action: "labor-check-project-labor-cost-conflicts",
18516
18771
  title: "Labor Check Project Labor Cost Conflicts Rates",
18517
18772
  description: "Labor Check Project Labor Cost Conflicts Rates.",
18518
- safety: "read",
18773
+ safety: "update",
18519
18774
  destructive: false,
18520
18775
  cli: {
18521
18776
  group: ["rates", "labor"],
18522
18777
  command: "check-project-labor-cost-conflicts",
18523
- interactive: "available"
18778
+ interactive: "default"
18524
18779
  },
18525
18780
  mcp: { entityTool: "rates" },
18526
18781
  inputSchema: /* @__PURE__ */ looseObject({
18527
- payload: /* @__PURE__ */ looseObject({
18528
- currency: /* @__PURE__ */ string$1(),
18529
- hourly_rate: /* @__PURE__ */ number$2(),
18530
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
18531
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
18532
- }),
18782
+ payload: rateSchedulePayloadSchema,
18533
18783
  project_id: /* @__PURE__ */ number$2()
18534
18784
  }),
18535
18785
  execute: (input, { client }) => {
@@ -18551,21 +18801,16 @@ const generatedFocusOperations = [
18551
18801
  action: "labor-check-project-user-labor-cost-conflicts",
18552
18802
  title: "Labor Check Project User Labor Cost Conflicts Rates",
18553
18803
  description: "Labor Check Project User Labor Cost Conflicts Rates.",
18554
- safety: "read",
18804
+ safety: "update",
18555
18805
  destructive: false,
18556
18806
  cli: {
18557
18807
  group: ["rates", "labor"],
18558
18808
  command: "check-project-user-labor-cost-conflicts",
18559
- interactive: "available"
18809
+ interactive: "default"
18560
18810
  },
18561
18811
  mcp: { entityTool: "rates" },
18562
18812
  inputSchema: /* @__PURE__ */ looseObject({
18563
- payload: /* @__PURE__ */ looseObject({
18564
- currency: /* @__PURE__ */ string$1(),
18565
- hourly_rate: /* @__PURE__ */ number$2(),
18566
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
18567
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
18568
- }),
18813
+ payload: rateSchedulePayloadSchema,
18569
18814
  project_id: /* @__PURE__ */ number$2(),
18570
18815
  user_id: /* @__PURE__ */ number$2()
18571
18816
  }),
@@ -18589,20 +18834,15 @@ const generatedFocusOperations = [
18589
18834
  action: "labor-check-workspace-labor-cost-conflicts",
18590
18835
  title: "Labor Check Workspace Labor Cost Conflicts Rates",
18591
18836
  description: "Labor Check Workspace Labor Cost Conflicts Rates.",
18592
- safety: "read",
18837
+ safety: "update",
18593
18838
  destructive: false,
18594
18839
  cli: {
18595
18840
  group: ["rates", "labor"],
18596
18841
  command: "check-workspace-labor-cost-conflicts",
18597
- interactive: "available"
18842
+ interactive: "default"
18598
18843
  },
18599
18844
  mcp: { entityTool: "rates" },
18600
- inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({
18601
- currency: /* @__PURE__ */ string$1(),
18602
- hourly_rate: /* @__PURE__ */ number$2(),
18603
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
18604
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
18605
- }) }),
18845
+ inputSchema: /* @__PURE__ */ looseObject({ payload: rateSchedulePayloadSchema }),
18606
18846
  execute: (input, { client }) => {
18607
18847
  const data = input;
18608
18848
  return client.runGeneratedRequest("checkWorkspaceLaborCostConflicts", () => callGeneratedRequest(checkWorkspaceLaborCostConflicts, [
@@ -18621,21 +18861,16 @@ const generatedFocusOperations = [
18621
18861
  action: "labor-check-workspace-user-labor-cost-conflicts",
18622
18862
  title: "Labor Check Workspace User Labor Cost Conflicts Rates",
18623
18863
  description: "Labor Check Workspace User Labor Cost Conflicts Rates.",
18624
- safety: "read",
18864
+ safety: "update",
18625
18865
  destructive: false,
18626
18866
  cli: {
18627
18867
  group: ["rates", "labor"],
18628
18868
  command: "check-workspace-user-labor-cost-conflicts",
18629
- interactive: "available"
18869
+ interactive: "default"
18630
18870
  },
18631
18871
  mcp: { entityTool: "rates" },
18632
18872
  inputSchema: /* @__PURE__ */ looseObject({
18633
- payload: /* @__PURE__ */ looseObject({
18634
- currency: /* @__PURE__ */ string$1(),
18635
- hourly_rate: /* @__PURE__ */ number$2(),
18636
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
18637
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
18638
- }),
18873
+ payload: rateSchedulePayloadSchema,
18639
18874
  user_id: /* @__PURE__ */ number$2()
18640
18875
  }),
18641
18876
  execute: (input, { client }) => {
@@ -19009,12 +19244,7 @@ const generatedFocusOperations = [
19009
19244
  },
19010
19245
  mcp: { entityTool: "rates" },
19011
19246
  inputSchema: /* @__PURE__ */ looseObject({
19012
- payload: /* @__PURE__ */ looseObject({
19013
- currency: /* @__PURE__ */ string$1(),
19014
- hourly_rate: /* @__PURE__ */ number$2(),
19015
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
19016
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
19017
- }),
19247
+ payload: rateSchedulePayloadSchema,
19018
19248
  project_id: /* @__PURE__ */ number$2()
19019
19249
  }),
19020
19250
  execute: (input, { client }) => {
@@ -19045,12 +19275,7 @@ const generatedFocusOperations = [
19045
19275
  },
19046
19276
  mcp: { entityTool: "rates" },
19047
19277
  inputSchema: /* @__PURE__ */ looseObject({
19048
- payload: /* @__PURE__ */ looseObject({
19049
- currency: /* @__PURE__ */ string$1(),
19050
- hourly_rate: /* @__PURE__ */ number$2(),
19051
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
19052
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
19053
- }),
19278
+ payload: rateSchedulePayloadSchema,
19054
19279
  project_id: /* @__PURE__ */ number$2(),
19055
19280
  user_id: /* @__PURE__ */ number$2()
19056
19281
  }),
@@ -19082,12 +19307,7 @@ const generatedFocusOperations = [
19082
19307
  interactive: "default"
19083
19308
  },
19084
19309
  mcp: { entityTool: "rates" },
19085
- inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({
19086
- currency: /* @__PURE__ */ string$1(),
19087
- hourly_rate: /* @__PURE__ */ number$2(),
19088
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
19089
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
19090
- }) }),
19310
+ inputSchema: /* @__PURE__ */ looseObject({ payload: rateSchedulePayloadSchema }),
19091
19311
  execute: (input, { client }) => {
19092
19312
  const data = input;
19093
19313
  return client.runGeneratedRequest("upsertWorkspaceLaborCostRate", () => callGeneratedRequest(upsertWorkspaceLaborCostRate, [
@@ -19115,12 +19335,7 @@ const generatedFocusOperations = [
19115
19335
  },
19116
19336
  mcp: { entityTool: "rates" },
19117
19337
  inputSchema: /* @__PURE__ */ looseObject({
19118
- payload: /* @__PURE__ */ looseObject({
19119
- currency: /* @__PURE__ */ string$1(),
19120
- hourly_rate: /* @__PURE__ */ number$2(),
19121
- start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
19122
- end_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()))
19123
- }),
19338
+ payload: rateSchedulePayloadSchema,
19124
19339
  user_id: /* @__PURE__ */ number$2()
19125
19340
  }),
19126
19341
  execute: (input, { client }) => {
@@ -19142,7 +19357,7 @@ const generatedFocusOperations = [
19142
19357
  action: "get-flexq-data",
19143
19358
  title: "Get Flexq Data Reports",
19144
19359
  description: "Get Flexq Data Reports.",
19145
- safety: "read",
19360
+ safety: "update",
19146
19361
  destructive: false,
19147
19362
  cli: {
19148
19363
  group: ["reports"],
@@ -19211,7 +19426,7 @@ const generatedFocusOperations = [
19211
19426
  action: "get-flexq-dictionary",
19212
19427
  title: "Get Flexq Dictionary Reports",
19213
19428
  description: "Get Flexq Dictionary Reports.",
19214
- safety: "read",
19429
+ safety: "update",
19215
19430
  destructive: false,
19216
19431
  cli: {
19217
19432
  group: ["reports"],
@@ -19237,7 +19452,7 @@ const generatedFocusOperations = [
19237
19452
  action: "get-workload",
19238
19453
  title: "Get Workload Reports",
19239
19454
  description: "Get Workload Reports.",
19240
- safety: "read",
19455
+ safety: "update",
19241
19456
  destructive: false,
19242
19457
  cli: {
19243
19458
  group: ["reports"],
@@ -20719,12 +20934,12 @@ const generatedFocusOperations = [
20719
20934
  action: "suggestions-get-project-suggestion-for-atask",
20720
20935
  title: "Suggestions Get Project Suggestion For Atask Tasks",
20721
20936
  description: "Suggestions Get Project Suggestion For Atask Tasks.",
20722
- safety: "read",
20937
+ safety: "update",
20723
20938
  destructive: false,
20724
20939
  cli: {
20725
20940
  group: ["tasks", "suggestions"],
20726
20941
  command: "get-project-suggestion-for-atask",
20727
- interactive: "available"
20942
+ interactive: "default"
20728
20943
  },
20729
20944
  mcp: { entityTool: "tasks" },
20730
20945
  inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({ task_id: /* @__PURE__ */ number$2() }) }),
@@ -20746,12 +20961,12 @@ const generatedFocusOperations = [
20746
20961
  action: "suggestions-get-project-suggestions-for-multiple-tasks",
20747
20962
  title: "Suggestions Get Project Suggestions For Multiple Tasks Tasks",
20748
20963
  description: "Suggestions Get Project Suggestions For Multiple Tasks Tasks.",
20749
- safety: "read",
20964
+ safety: "update",
20750
20965
  destructive: false,
20751
20966
  cli: {
20752
20967
  group: ["tasks", "suggestions"],
20753
20968
  command: "get-project-suggestions-for-multiple-tasks",
20754
- interactive: "available"
20969
+ interactive: "default"
20755
20970
  },
20756
20971
  mcp: { entityTool: "tasks" },
20757
20972
  inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({ task_ids: /* @__PURE__ */ array$1(/* @__PURE__ */ number$2()) }) }),
@@ -21387,7 +21602,7 @@ const generatedFocusOperations = [
21387
21602
  action: "bulk-set-day-duration",
21388
21603
  title: "Bulk Set Day Duration Time Entries",
21389
21604
  description: "Bulk Set Day Duration Time Entries.",
21390
- safety: "read",
21605
+ safety: "update",
21391
21606
  destructive: false,
21392
21607
  cli: {
21393
21608
  group: ["time-entries", "bulk"],
@@ -21883,12 +22098,12 @@ const generatedFocusOperations = [
21883
22098
  action: "tracking-start-tracking-from-description",
21884
22099
  title: "Tracking Start Tracking From Description Time Entries",
21885
22100
  description: "Tracking Start Tracking From Description Time Entries.",
21886
- safety: "read",
22101
+ safety: "update",
21887
22102
  destructive: false,
21888
22103
  cli: {
21889
22104
  group: ["time-entries", "tracking"],
21890
22105
  command: "start-tracking-from-description",
21891
- interactive: "available"
22106
+ interactive: "default"
21892
22107
  },
21893
22108
  mcp: { entityTool: "time-entries" },
21894
22109
  inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({
@@ -21989,12 +22204,12 @@ const generatedFocusOperations = [
21989
22204
  action: "get-for-acalendar-event-title",
21990
22205
  title: "Get For Acalendar Event Title Time Log Suggestions",
21991
22206
  description: "Get For Acalendar Event Title Time Log Suggestions.",
21992
- safety: "read",
22207
+ safety: "update",
21993
22208
  destructive: false,
21994
22209
  cli: {
21995
22210
  group: ["time-log-suggestions"],
21996
22211
  command: "get-for-acalendar-event-title",
21997
- interactive: "available"
22212
+ interactive: "default"
21998
22213
  },
21999
22214
  mcp: { entityTool: "time-log-suggestions" },
22000
22215
  inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({ title: /* @__PURE__ */ string$1() }) }),
@@ -22016,12 +22231,12 @@ const generatedFocusOperations = [
22016
22231
  action: "get-for-multiple-calendar-event-titles",
22017
22232
  title: "Get For Multiple Calendar Event Titles Time Log Suggestions",
22018
22233
  description: "Get For Multiple Calendar Event Titles Time Log Suggestions.",
22019
- safety: "read",
22234
+ safety: "update",
22020
22235
  destructive: false,
22021
22236
  cli: {
22022
22237
  group: ["time-log-suggestions"],
22023
22238
  command: "get-for-multiple-calendar-event-titles",
22024
- interactive: "available"
22239
+ interactive: "default"
22025
22240
  },
22026
22241
  mcp: { entityTool: "time-log-suggestions" },
22027
22242
  inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({ items: /* @__PURE__ */ array$1(/* @__PURE__ */ looseObject({
@@ -22391,12 +22606,12 @@ const generatedFocusOperations = [
22391
22606
  action: "approve",
22392
22607
  title: "Approve Timesheets",
22393
22608
  description: "Approve Timesheets.",
22394
- safety: "read",
22609
+ safety: "update",
22395
22610
  destructive: false,
22396
22611
  cli: {
22397
22612
  group: ["timesheets"],
22398
22613
  command: "approve",
22399
- interactive: "available"
22614
+ interactive: "default"
22400
22615
  },
22401
22616
  mcp: { entityTool: "timesheets" },
22402
22617
  inputSchema: /* @__PURE__ */ looseObject({
@@ -22424,12 +22639,12 @@ const generatedFocusOperations = [
22424
22639
  action: "bulk-approve",
22425
22640
  title: "Bulk Approve Timesheets",
22426
22641
  description: "Bulk Approve Timesheets.",
22427
- safety: "read",
22642
+ safety: "update",
22428
22643
  destructive: false,
22429
22644
  cli: {
22430
22645
  group: ["timesheets", "bulk"],
22431
22646
  command: "approve",
22432
- interactive: "available"
22647
+ interactive: "default"
22433
22648
  },
22434
22649
  mcp: { entityTool: "timesheets" },
22435
22650
  inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({ keys: /* @__PURE__ */ array$1(/* @__PURE__ */ looseObject({
@@ -22455,12 +22670,12 @@ const generatedFocusOperations = [
22455
22670
  action: "bulk-request-changes",
22456
22671
  title: "Bulk Request Changes Timesheets",
22457
22672
  description: "Bulk Request Changes Timesheets.",
22458
- safety: "read",
22673
+ safety: "update",
22459
22674
  destructive: false,
22460
22675
  cli: {
22461
22676
  group: ["timesheets", "bulk"],
22462
22677
  command: "request-changes",
22463
- interactive: "available"
22678
+ interactive: "default"
22464
22679
  },
22465
22680
  mcp: { entityTool: "timesheets" },
22466
22681
  inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({
@@ -22681,12 +22896,12 @@ const generatedFocusOperations = [
22681
22896
  action: "remove-timesheet-flag",
22682
22897
  title: "Remove Timesheet Flag Timesheets",
22683
22898
  description: "Remove Timesheet Flag Timesheets.",
22684
- safety: "read",
22685
- destructive: false,
22899
+ safety: "delete",
22900
+ destructive: true,
22686
22901
  cli: {
22687
22902
  group: ["timesheets"],
22688
22903
  command: "remove-timesheet-flag",
22689
- interactive: "available"
22904
+ interactive: "default"
22690
22905
  },
22691
22906
  mcp: { entityTool: "timesheets" },
22692
22907
  inputSchema: /* @__PURE__ */ looseObject({ flag_id: /* @__PURE__ */ number$2() }),
@@ -22708,12 +22923,12 @@ const generatedFocusOperations = [
22708
22923
  action: "request-changes",
22709
22924
  title: "Request Changes Timesheets",
22710
22925
  description: "Request Changes Timesheets.",
22711
- safety: "read",
22926
+ safety: "update",
22712
22927
  destructive: false,
22713
22928
  cli: {
22714
22929
  group: ["timesheets"],
22715
22930
  command: "request-changes",
22716
- interactive: "available"
22931
+ interactive: "default"
22717
22932
  },
22718
22933
  mcp: { entityTool: "timesheets" },
22719
22934
  inputSchema: /* @__PURE__ */ looseObject({
@@ -22743,12 +22958,12 @@ const generatedFocusOperations = [
22743
22958
  action: "resubmit",
22744
22959
  title: "Resubmit Timesheets",
22745
22960
  description: "Resubmit Timesheets.",
22746
- safety: "read",
22961
+ safety: "update",
22747
22962
  destructive: false,
22748
22963
  cli: {
22749
22964
  group: ["timesheets"],
22750
22965
  command: "resubmit",
22751
- interactive: "available"
22966
+ interactive: "default"
22752
22967
  },
22753
22968
  mcp: { entityTool: "timesheets" },
22754
22969
  inputSchema: /* @__PURE__ */ looseObject({
@@ -22843,12 +23058,12 @@ const generatedFocusOperations = [
22843
23058
  action: "setups-discontinue",
22844
23059
  title: "Setups Discontinue Timesheets",
22845
23060
  description: "Setups Discontinue Timesheets.",
22846
- safety: "read",
23061
+ safety: "update",
22847
23062
  destructive: false,
22848
23063
  cli: {
22849
23064
  group: ["timesheets", "setups"],
22850
23065
  command: "discontinue",
22851
- interactive: "available"
23066
+ interactive: "default"
22852
23067
  },
22853
23068
  mcp: { entityTool: "timesheets" },
22854
23069
  inputSchema: /* @__PURE__ */ looseObject({
@@ -23029,12 +23244,12 @@ const generatedFocusOperations = [
23029
23244
  action: "submit",
23030
23245
  title: "Submit Timesheets",
23031
23246
  description: "Submit Timesheets.",
23032
- safety: "read",
23247
+ safety: "update",
23033
23248
  destructive: false,
23034
23249
  cli: {
23035
23250
  group: ["timesheets"],
23036
23251
  command: "submit",
23037
- interactive: "available"
23252
+ interactive: "default"
23038
23253
  },
23039
23254
  mcp: { entityTool: "timesheets" },
23040
23255
  inputSchema: /* @__PURE__ */ looseObject({
@@ -23062,12 +23277,12 @@ const generatedFocusOperations = [
23062
23277
  action: "withdraw",
23063
23278
  title: "Withdraw Timesheets",
23064
23279
  description: "Withdraw Timesheets.",
23065
- safety: "read",
23280
+ safety: "update",
23066
23281
  destructive: false,
23067
23282
  cli: {
23068
23283
  group: ["timesheets"],
23069
23284
  command: "withdraw",
23070
- interactive: "available"
23285
+ interactive: "default"
23071
23286
  },
23072
23287
  mcp: { entityTool: "timesheets" },
23073
23288
  inputSchema: /* @__PURE__ */ looseObject({
@@ -23595,6 +23810,8 @@ const focusOperationOverrides = {
23595
23810
  ...taskAttachmentOverrides,
23596
23811
  ...projectOverrides,
23597
23812
  ...projectAttachmentOverrides,
23813
+ ...rateOverrides,
23814
+ ...readOnlyPostOverrides,
23598
23815
  ...timeBlockOverrides,
23599
23816
  ...timeEntryOverrides,
23600
23817
  ...statusOverrides,
@@ -24515,22 +24732,11 @@ async function readInput(operation, options) {
24515
24732
  function hasExplicitInput(operation, options) {
24516
24733
  return Boolean(options.dataFile || options.data || inputFromScalarFlags(operation, options));
24517
24734
  }
24518
- function formatIssueMessage(issue) {
24519
- if (issue.type === "object" && issue.message.includes("but received undefined")) return "required";
24520
- return issue.message;
24521
- }
24522
- function formatValibotError(issues) {
24523
- return issues.map((issue) => {
24524
- const path = issue.path?.map((segment) => String(segment.key)).join(".") ?? "";
24525
- const message = formatIssueMessage(issue);
24526
- return path ? `${path}: ${message}` : message;
24527
- }).join("; ");
24528
- }
24529
24735
  async function runValidatedOperation(operation, options, deps) {
24530
24736
  if (operation.hidden) throw new Error(`Operation '${operation.id}' is not available in this build.`);
24531
24737
  const rawInput = deps.rawInput ?? await readInput(operation, options);
24532
24738
  const parseResult = /* @__PURE__ */ safeParse(operation.inputSchema, rawInput);
24533
- if (!parseResult.success) throw new Error(`Invalid input: ${formatValibotError(parseResult.issues)}`);
24739
+ if (!parseResult.success) throw new Error(`Invalid input: ${formatValibotError(parseResult.issues, Number.POSITIVE_INFINITY)}`);
24534
24740
  const input = parseResult.output;
24535
24741
  if (options.dryRun) {
24536
24742
  deps.outputJson({
@@ -25094,4 +25300,4 @@ Common commands:
25094
25300
  //#endregion
25095
25301
  export { CommanderError as n, createProgram as t };
25096
25302
 
25097
- //# sourceMappingURL=program-DskwjJUv.js.map
25303
+ //# sourceMappingURL=program-BJrl7qqO.js.map
package/build/program.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as createProgram } from "./program-DskwjJUv.js";
1
+ import { t as createProgram } from "./program-BJrl7qqO.js";
2
2
  export { createProgram };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@togglhq/cli",
3
- "version": "1.6.16",
3
+ "version": "1.7.1",
4
4
  "description": "Toggl CLI for Toggl 2.0 API operations.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -55,7 +55,7 @@
55
55
  "devDependencies": {
56
56
  "@toggl/cli-core": "workspace:^",
57
57
  "@toggl/operations": "workspace:^",
58
- "@toggl/queries": "2.1.194",
58
+ "@toggl/queries": "2.1.212",
59
59
  "@types/node": "22.19.11",
60
60
  "tsdown": "0.21.8",
61
61
  "typescript": "5.9.3",