harness-mcp-v2 3.2.38 → 3.2.39

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.
Files changed (89) hide show
  1. package/README.md +7 -7
  2. package/build/client/harness-client.d.ts.map +1 -1
  3. package/build/client/harness-client.js +29 -11
  4. package/build/client/harness-client.js.map +1 -1
  5. package/build/client/types.d.ts +6 -0
  6. package/build/client/types.d.ts.map +1 -1
  7. package/build/registry/extractors.d.ts +6 -0
  8. package/build/registry/extractors.d.ts.map +1 -1
  9. package/build/registry/extractors.js +56 -4
  10. package/build/registry/extractors.js.map +1 -1
  11. package/build/registry/index.d.ts.map +1 -1
  12. package/build/registry/index.js +14 -1
  13. package/build/registry/index.js.map +1 -1
  14. package/build/registry/pagination.d.ts +25 -0
  15. package/build/registry/pagination.d.ts.map +1 -0
  16. package/build/registry/pagination.js +68 -0
  17. package/build/registry/pagination.js.map +1 -0
  18. package/build/registry/scope-utils.d.ts.map +1 -1
  19. package/build/registry/scope-utils.js +5 -4
  20. package/build/registry/scope-utils.js.map +1 -1
  21. package/build/registry/toolsets/ai-evals.d.ts.map +1 -1
  22. package/build/registry/toolsets/ai-evals.js +10 -9
  23. package/build/registry/toolsets/ai-evals.js.map +1 -1
  24. package/build/registry/toolsets/ccm.d.ts.map +1 -1
  25. package/build/registry/toolsets/ccm.js +13 -18
  26. package/build/registry/toolsets/ccm.js.map +1 -1
  27. package/build/registry/toolsets/chaos.d.ts.map +1 -1
  28. package/build/registry/toolsets/chaos.js +3 -2
  29. package/build/registry/toolsets/chaos.js.map +1 -1
  30. package/build/registry/toolsets/feature-flags.d.ts.map +1 -1
  31. package/build/registry/toolsets/feature-flags.js +88 -87
  32. package/build/registry/toolsets/feature-flags.js.map +1 -1
  33. package/build/registry/toolsets/gitops.d.ts.map +1 -1
  34. package/build/registry/toolsets/gitops.js +3 -2
  35. package/build/registry/toolsets/gitops.js.map +1 -1
  36. package/build/registry/toolsets/iacm.d.ts.map +1 -1
  37. package/build/registry/toolsets/iacm.js +7 -6
  38. package/build/registry/toolsets/iacm.js.map +1 -1
  39. package/build/registry/toolsets/idp.d.ts.map +1 -1
  40. package/build/registry/toolsets/idp.js +17 -3
  41. package/build/registry/toolsets/idp.js.map +1 -1
  42. package/build/registry/toolsets/incidents.d.ts.map +1 -1
  43. package/build/registry/toolsets/incidents.js +94 -7
  44. package/build/registry/toolsets/incidents.js.map +1 -1
  45. package/build/registry/toolsets/knowledge-graph.d.ts.map +1 -1
  46. package/build/registry/toolsets/knowledge-graph.js +21 -6
  47. package/build/registry/toolsets/knowledge-graph.js.map +1 -1
  48. package/build/registry/toolsets/observability-evaluations.d.ts.map +1 -1
  49. package/build/registry/toolsets/observability-evaluations.js +4 -3
  50. package/build/registry/toolsets/observability-evaluations.js.map +1 -1
  51. package/build/registry/toolsets/pipelines.d.ts.map +1 -1
  52. package/build/registry/toolsets/pipelines.js +2 -1
  53. package/build/registry/toolsets/pipelines.js.map +1 -1
  54. package/build/registry/toolsets/pull-requests.d.ts.map +1 -1
  55. package/build/registry/toolsets/pull-requests.js +3 -2
  56. package/build/registry/toolsets/pull-requests.js.map +1 -1
  57. package/build/registry/toolsets/registries.d.ts.map +1 -1
  58. package/build/registry/toolsets/registries.js +11 -5
  59. package/build/registry/toolsets/registries.js.map +1 -1
  60. package/build/registry/toolsets/repositories.d.ts.map +1 -1
  61. package/build/registry/toolsets/repositories.js +3 -2
  62. package/build/registry/toolsets/repositories.js.map +1 -1
  63. package/build/registry/toolsets/runbooks.d.ts +3 -0
  64. package/build/registry/toolsets/runbooks.d.ts.map +1 -0
  65. package/build/registry/toolsets/runbooks.js +164 -0
  66. package/build/registry/toolsets/runbooks.js.map +1 -0
  67. package/build/registry/toolsets/scs.d.ts.map +1 -1
  68. package/build/registry/toolsets/scs.js +3 -2
  69. package/build/registry/toolsets/scs.js.map +1 -1
  70. package/build/registry/toolsets/sei.d.ts.map +1 -1
  71. package/build/registry/toolsets/sei.js +3 -2
  72. package/build/registry/toolsets/sei.js.map +1 -1
  73. package/build/registry/toolsets/sto.d.ts.map +1 -1
  74. package/build/registry/toolsets/sto.js +2 -1
  75. package/build/registry/toolsets/sto.js.map +1 -1
  76. package/build/registry/toolsets/templates.d.ts.map +1 -1
  77. package/build/registry/toolsets/templates.js +6 -5
  78. package/build/registry/toolsets/templates.js.map +1 -1
  79. package/build/registry/types.d.ts +13 -1
  80. package/build/registry/types.d.ts.map +1 -1
  81. package/build/utils/materialize-input-sets.d.ts.map +1 -1
  82. package/build/utils/materialize-input-sets.js +2 -1
  83. package/build/utils/materialize-input-sets.js.map +1 -1
  84. package/build/utils/path.d.ts +3 -0
  85. package/build/utils/path.d.ts.map +1 -0
  86. package/build/utils/path.js +8 -0
  87. package/build/utils/path.js.map +1 -0
  88. package/npm-shrinkwrap.json +3 -3
  89. package/package.json +3 -3
@@ -1,3 +1,4 @@
1
+ import { encodePathSegment } from "../../utils/path.js";
1
2
  import { passthrough, fmeListExtract, fmeGetExtract, fmeV4PaginatedListExtract, fmeV4EntityExtract, fmeExperimentResultExtract } from "../extractors.js";
2
3
  import { isFmeHarnessNativeSelected, logFmeDeprecation, requireFmeIdentifier, requireHarnessNativeSegmentScope, resolveFmeDualMode } from "../scope-utils.js";
3
4
  const fmeActionExtract = (raw) => {
@@ -232,7 +233,7 @@ function resolveNativeOnlyEnvironmentRoute(input, operation, opts = {}) {
232
233
  scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS,
233
234
  };
234
235
  }
235
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_environment"));
236
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_environment"));
236
237
  return {
237
238
  path: `/fme/api/v4/environments/${environmentId}`,
238
239
  product: "harness",
@@ -475,7 +476,7 @@ function resolveNativeOnlyDefinitionRoute(input, operation, opts = {}) {
475
476
  scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS,
476
477
  };
477
478
  }
478
- const flagName = encodeURIComponent(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag_definition"));
479
+ const flagName = encodePathSegment(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag_definition"));
479
480
  requireFmeIdentifier(input, "environment_id", "fme_feature_flag_definition");
480
481
  return {
481
482
  path: `/fme/api/v4/feature-flag-definitions/${flagName}${opts.suffix ?? ""}`,
@@ -554,7 +555,7 @@ export const featureFlagsToolset = {
554
555
  routeResolver: (input) => {
555
556
  const mode = resolveFmeDualMode(input, "fme_environment");
556
557
  if (mode.mode === "legacy") {
557
- return { path: `/internal/api/v2/environments/ws/${encodeURIComponent(mode.workspaceId)}` };
558
+ return { path: `/internal/api/v2/environments/ws/${encodePathSegment(mode.workspaceId)}` };
558
559
  }
559
560
  return { path: "/fme/api/v4/environments", product: "harness", scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS };
560
561
  },
@@ -646,7 +647,7 @@ export const featureFlagsToolset = {
646
647
  routeResolver: (input) => {
647
648
  const mode = resolveFmeDualMode(input, "fme_feature_flag");
648
649
  if (mode.mode === "legacy") {
649
- return { path: `/internal/api/v2/splits/ws/${encodeURIComponent(mode.workspaceId)}` };
650
+ return { path: `/internal/api/v2/splits/ws/${encodePathSegment(mode.workspaceId)}` };
650
651
  }
651
652
  return { path: "/fme/api/v4/feature-flags", product: "harness", scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS };
652
653
  },
@@ -666,9 +667,9 @@ export const featureFlagsToolset = {
666
667
  path: "",
667
668
  routeResolver: (input) => {
668
669
  const mode = resolveFmeDualMode(input, "fme_feature_flag");
669
- const flagName = encodeURIComponent(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
670
+ const flagName = encodePathSegment(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
670
671
  if (mode.mode === "legacy") {
671
- return { path: `/internal/api/v2/splits/ws/${encodeURIComponent(mode.workspaceId)}/${flagName}` };
672
+ return { path: `/internal/api/v2/splits/ws/${encodePathSegment(mode.workspaceId)}/${flagName}` };
672
673
  }
673
674
  return { path: `/fme/api/v4/feature-flags/${flagName}`, product: "harness", scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS };
674
675
  },
@@ -684,7 +685,7 @@ export const featureFlagsToolset = {
684
685
  if (mode.mode === "harness_native") {
685
686
  return { path: "/fme/api/v4/feature-flags", product: "harness", scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS };
686
687
  }
687
- return { path: `/internal/api/v2/splits/ws/${encodeURIComponent(mode.workspaceId)}/trafficTypes/${encodeURIComponent(requireFmeIdentifier(input, "traffic_type_id", "fme_feature_flag"))}` };
688
+ return { path: `/internal/api/v2/splits/ws/${encodePathSegment(mode.workspaceId)}/trafficTypes/${encodePathSegment(requireFmeIdentifier(input, "traffic_type_id", "fme_feature_flag"))}` };
688
689
  },
689
690
  operationPolicy: { risk: "low_write", retryPolicy: "do_not_retry" },
690
691
  pathParams: { workspace_id: "wsId", traffic_type_id: "trafficTypeId" },
@@ -721,9 +722,9 @@ export const featureFlagsToolset = {
721
722
  path: "",
722
723
  routeResolver: (input) => {
723
724
  const mode = resolveFmeDualMode(input, "fme_feature_flag");
724
- const flagName = encodeURIComponent(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
725
+ const flagName = encodePathSegment(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
725
726
  if (mode.mode === "legacy") {
726
- return { path: `/internal/api/v2/splits/ws/${encodeURIComponent(mode.workspaceId)}/${flagName}` };
727
+ return { path: `/internal/api/v2/splits/ws/${encodePathSegment(mode.workspaceId)}/${flagName}` };
727
728
  }
728
729
  return { path: `/fme/api/v4/feature-flags/${flagName}`, product: "harness", scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS };
729
730
  },
@@ -736,7 +737,7 @@ export const featureFlagsToolset = {
736
737
  path: "/internal/api/v2/splits/ws/{wsId}/{featureFlagName}",
737
738
  routeResolver: (input) => {
738
739
  const mode = resolveFmeDualMode(input, "fme_feature_flag");
739
- const flagName = encodeURIComponent(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
740
+ const flagName = encodePathSegment(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
740
741
  if (mode.mode === "harness_native") {
741
742
  return {
742
743
  path: `/fme/api/v4/feature-flags/${flagName}`,
@@ -745,7 +746,7 @@ export const featureFlagsToolset = {
745
746
  headers: { "Content-Type": "application/merge-patch+json" },
746
747
  };
747
748
  }
748
- return { path: `/internal/api/v2/splits/ws/${encodeURIComponent(mode.workspaceId)}/${flagName}` };
749
+ return { path: `/internal/api/v2/splits/ws/${encodePathSegment(mode.workspaceId)}/${flagName}` };
749
750
  },
750
751
  operationPolicy: { risk: "low_write", retryPolicy: "safe" },
751
752
  pathParams: { workspace_id: "wsId", feature_flag_name: "featureFlagName" },
@@ -797,8 +798,8 @@ export const featureFlagsToolset = {
797
798
  methodBuilder: (input) => (isFmeHarnessNativeSelected(input, "fme_feature_flag") ? "POST" : "PUT"),
798
799
  routeResolver: (input) => {
799
800
  const mode = resolveFmeDualMode(input, "fme_feature_flag");
800
- const flagName = encodeURIComponent(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
801
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_feature_flag"));
801
+ const flagName = encodePathSegment(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
802
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_feature_flag"));
802
803
  if (mode.mode === "harness_native") {
803
804
  return {
804
805
  path: `/fme/api/v4/feature-flag-definitions/${flagName}/kill`,
@@ -806,7 +807,7 @@ export const featureFlagsToolset = {
806
807
  scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS,
807
808
  };
808
809
  }
809
- return { path: `/internal/api/v2/splits/ws/${encodeURIComponent(mode.workspaceId)}/${flagName}/environments/${environmentId}/kill` };
810
+ return { path: `/internal/api/v2/splits/ws/${encodePathSegment(mode.workspaceId)}/${flagName}/environments/${environmentId}/kill` };
810
811
  },
811
812
  operationPolicy: { risk: "high_write", retryPolicy: "do_not_retry" },
812
813
  pathParams: {
@@ -832,8 +833,8 @@ export const featureFlagsToolset = {
832
833
  methodBuilder: (input) => (isFmeHarnessNativeSelected(input, "fme_feature_flag") ? "POST" : "PUT"),
833
834
  routeResolver: (input) => {
834
835
  const mode = resolveFmeDualMode(input, "fme_feature_flag");
835
- const flagName = encodeURIComponent(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
836
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_feature_flag"));
836
+ const flagName = encodePathSegment(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
837
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_feature_flag"));
837
838
  if (mode.mode === "harness_native") {
838
839
  return {
839
840
  path: `/fme/api/v4/feature-flag-definitions/${flagName}/restore`,
@@ -841,7 +842,7 @@ export const featureFlagsToolset = {
841
842
  scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS,
842
843
  };
843
844
  }
844
- return { path: `/internal/api/v2/splits/ws/${encodeURIComponent(mode.workspaceId)}/${flagName}/environments/${environmentId}/restore` };
845
+ return { path: `/internal/api/v2/splits/ws/${encodePathSegment(mode.workspaceId)}/${flagName}/environments/${environmentId}/restore` };
845
846
  },
846
847
  operationPolicy: { risk: "high_write", retryPolicy: "do_not_retry" },
847
848
  pathParams: {
@@ -866,8 +867,8 @@ export const featureFlagsToolset = {
866
867
  path: "/internal/api/v2/splits/ws/{wsId}/{featureFlagName}/environments/{environmentId}/reallocate",
867
868
  routeResolver: (input) => {
868
869
  const mode = resolveFmeDualMode(input, "fme_feature_flag");
869
- const flagName = encodeURIComponent(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
870
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_feature_flag"));
870
+ const flagName = encodePathSegment(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
871
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_feature_flag"));
871
872
  if (mode.mode === "harness_native") {
872
873
  return {
873
874
  path: `/fme/api/v4/feature-flag-definitions/${flagName}/reallocate`,
@@ -875,7 +876,7 @@ export const featureFlagsToolset = {
875
876
  scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS,
876
877
  };
877
878
  }
878
- return { path: `/internal/api/v2/splits/ws/${encodeURIComponent(mode.workspaceId)}/${flagName}/environments/${environmentId}/reallocate` };
879
+ return { path: `/internal/api/v2/splits/ws/${encodePathSegment(mode.workspaceId)}/${flagName}/environments/${environmentId}/reallocate` };
879
880
  },
880
881
  operationPolicy: { risk: "high_write", retryPolicy: "do_not_retry" },
881
882
  pathParams: {
@@ -900,7 +901,7 @@ export const featureFlagsToolset = {
900
901
  path: "/internal/api/v2/splits/ws/{wsId}/{featureFlagName}/archive",
901
902
  routeResolver: (input) => {
902
903
  const mode = resolveFmeDualMode(input, "fme_feature_flag");
903
- const flagName = encodeURIComponent(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
904
+ const flagName = encodePathSegment(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
904
905
  if (mode.mode === "harness_native") {
905
906
  return {
906
907
  path: `/fme/api/v4/feature-flags/${flagName}/archive`,
@@ -908,7 +909,7 @@ export const featureFlagsToolset = {
908
909
  scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS,
909
910
  };
910
911
  }
911
- return { path: `/internal/api/v2/splits/ws/${encodeURIComponent(mode.workspaceId)}/${flagName}/archive` };
912
+ return { path: `/internal/api/v2/splits/ws/${encodePathSegment(mode.workspaceId)}/${flagName}/archive` };
912
913
  },
913
914
  operationPolicy: { risk: "high_write", retryPolicy: "do_not_retry" },
914
915
  pathParams: { workspace_id: "wsId", feature_flag_name: "featureFlagName" },
@@ -928,7 +929,7 @@ export const featureFlagsToolset = {
928
929
  path: "/internal/api/v2/splits/ws/{wsId}/{featureFlagName}/unarchive",
929
930
  routeResolver: (input) => {
930
931
  const mode = resolveFmeDualMode(input, "fme_feature_flag");
931
- const flagName = encodeURIComponent(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
932
+ const flagName = encodePathSegment(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag"));
932
933
  if (mode.mode === "harness_native") {
933
934
  return {
934
935
  path: `/fme/api/v4/feature-flags/${flagName}/unarchive`,
@@ -936,7 +937,7 @@ export const featureFlagsToolset = {
936
937
  scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS,
937
938
  };
938
939
  }
939
- return { path: `/internal/api/v2/splits/ws/${encodeURIComponent(mode.workspaceId)}/${flagName}/unarchive` };
940
+ return { path: `/internal/api/v2/splits/ws/${encodePathSegment(mode.workspaceId)}/${flagName}/unarchive` };
940
941
  },
941
942
  operationPolicy: { risk: "high_write", retryPolicy: "do_not_retry" },
942
943
  pathParams: { workspace_id: "wsId", feature_flag_name: "featureFlagName" },
@@ -982,12 +983,12 @@ export const featureFlagsToolset = {
982
983
  path: "/internal/api/v2/splits/ws/{wsId}/{featureFlagName}/environments/{environmentId}",
983
984
  routeResolver: (input) => {
984
985
  const mode = resolveFmeDualMode(input, "fme_feature_flag_definition");
985
- const flagName = encodeURIComponent(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag_definition"));
986
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_feature_flag_definition"));
986
+ const flagName = encodePathSegment(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag_definition"));
987
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_feature_flag_definition"));
987
988
  if (mode.mode === "harness_native") {
988
989
  return { path: `/fme/api/v4/feature-flag-definitions/${flagName}`, product: "harness", scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS };
989
990
  }
990
- return { path: `/internal/api/v2/splits/ws/${encodeURIComponent(mode.workspaceId)}/${flagName}/environments/${environmentId}` };
991
+ return { path: `/internal/api/v2/splits/ws/${encodePathSegment(mode.workspaceId)}/${flagName}/environments/${environmentId}` };
991
992
  },
992
993
  operationPolicy: { risk: "read", retryPolicy: "safe" },
993
994
  pathParams: {
@@ -1004,12 +1005,12 @@ export const featureFlagsToolset = {
1004
1005
  path: "/internal/api/v2/splits/ws/{wsId}/{featureFlagName}/environments/{environmentId}",
1005
1006
  routeResolver: (input) => {
1006
1007
  const mode = resolveFmeDualMode(input, "fme_feature_flag_definition");
1007
- const flagName = encodeURIComponent(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag_definition"));
1008
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_feature_flag_definition"));
1008
+ const flagName = encodePathSegment(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag_definition"));
1009
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_feature_flag_definition"));
1009
1010
  if (mode.mode === "harness_native") {
1010
1011
  return { path: `/fme/api/v4/feature-flag-definitions/${flagName}`, product: "harness", scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS };
1011
1012
  }
1012
- return { path: `/internal/api/v2/splits/ws/${encodeURIComponent(mode.workspaceId)}/${flagName}/environments/${environmentId}` };
1013
+ return { path: `/internal/api/v2/splits/ws/${encodePathSegment(mode.workspaceId)}/${flagName}/environments/${environmentId}` };
1013
1014
  },
1014
1015
  operationPolicy: { risk: "low_write", retryPolicy: "do_not_retry" },
1015
1016
  pathParams: {
@@ -1029,8 +1030,8 @@ export const featureFlagsToolset = {
1029
1030
  path: "/internal/api/v2/splits/ws/{wsId}/{featureFlagName}/environments/{environmentId}",
1030
1031
  routeResolver: (input) => {
1031
1032
  const mode = resolveFmeDualMode(input, "fme_feature_flag_definition");
1032
- const flagName = encodeURIComponent(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag_definition"));
1033
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_feature_flag_definition"));
1033
+ const flagName = encodePathSegment(requireFmeIdentifier(input, "feature_flag_name", "fme_feature_flag_definition"));
1034
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_feature_flag_definition"));
1034
1035
  if (mode.mode === "harness_native") {
1035
1036
  return {
1036
1037
  path: `/fme/api/v4/feature-flag-definitions/${flagName}`,
@@ -1039,7 +1040,7 @@ export const featureFlagsToolset = {
1039
1040
  headers: { "Content-Type": "application/merge-patch+json" },
1040
1041
  };
1041
1042
  }
1042
- return { path: `/internal/api/v2/splits/ws/${encodeURIComponent(mode.workspaceId)}/${flagName}/environments/${environmentId}` };
1043
+ return { path: `/internal/api/v2/splits/ws/${encodePathSegment(mode.workspaceId)}/${flagName}/environments/${environmentId}` };
1043
1044
  },
1044
1045
  operationPolicy: { risk: "low_write", retryPolicy: "safe" },
1045
1046
  pathParams: {
@@ -1138,7 +1139,7 @@ export const featureFlagsToolset = {
1138
1139
  routeResolver: (input) => {
1139
1140
  const mode = resolveFmeDualMode(input, "fme_rollout_status");
1140
1141
  if (mode.mode === "legacy") {
1141
- return { path: `/internal/api/v2/rolloutStatuses/ws/${encodeURIComponent(mode.workspaceId)}` };
1142
+ return { path: `/internal/api/v2/rolloutStatuses/ws/${encodePathSegment(mode.workspaceId)}` };
1142
1143
  }
1143
1144
  return { path: "/fme/api/v4/rollout-statuses", product: "harness", scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS };
1144
1145
  },
@@ -1171,7 +1172,7 @@ export const featureFlagsToolset = {
1171
1172
  if (mode.mode === "harness_native") {
1172
1173
  throw new Error("fme_rule_based_segment.list: Harness-native (org_id/project_id) mode is not supported on this deprecated resource — use fme_segment instead.");
1173
1174
  }
1174
- return { path: `/internal/api/v2/rule-based-segments/ws/${encodeURIComponent(mode.workspaceId)}` };
1175
+ return { path: `/internal/api/v2/rule-based-segments/ws/${encodePathSegment(mode.workspaceId)}` };
1175
1176
  },
1176
1177
  operationPolicy: { risk: "read", retryPolicy: "safe" },
1177
1178
  responseExtractor: passthrough,
@@ -1185,8 +1186,8 @@ export const featureFlagsToolset = {
1185
1186
  if (mode.mode === "harness_native") {
1186
1187
  throw new Error("fme_rule_based_segment.get: Harness-native (org_id/project_id) mode is not supported on this deprecated resource — use fme_segment instead.");
1187
1188
  }
1188
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_rule_based_segment"));
1189
- return { path: `/internal/api/v2/rule-based-segments/ws/${encodeURIComponent(mode.workspaceId)}/${segmentName}` };
1189
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_rule_based_segment"));
1190
+ return { path: `/internal/api/v2/rule-based-segments/ws/${encodePathSegment(mode.workspaceId)}/${segmentName}` };
1190
1191
  },
1191
1192
  operationPolicy: { risk: "read", retryPolicy: "safe" },
1192
1193
  responseExtractor: passthrough,
@@ -1200,7 +1201,7 @@ export const featureFlagsToolset = {
1200
1201
  if (mode.mode === "harness_native") {
1201
1202
  throw new Error("fme_rule_based_segment.create: Harness-native (org_id/project_id) mode is not supported on this deprecated resource — use fme_segment instead.");
1202
1203
  }
1203
- return { path: `/internal/api/v2/rule-based-segments/ws/${encodeURIComponent(mode.workspaceId)}/trafficTypes/${encodeURIComponent(requireFmeIdentifier(input, "traffic_type_id", "fme_rule_based_segment"))}` };
1204
+ return { path: `/internal/api/v2/rule-based-segments/ws/${encodePathSegment(mode.workspaceId)}/trafficTypes/${encodePathSegment(requireFmeIdentifier(input, "traffic_type_id", "fme_rule_based_segment"))}` };
1204
1205
  },
1205
1206
  operationPolicy: { risk: "low_write", retryPolicy: "do_not_retry" },
1206
1207
  bodyBuilder: (input) => {
@@ -1222,8 +1223,8 @@ export const featureFlagsToolset = {
1222
1223
  if (mode.mode === "harness_native") {
1223
1224
  throw new Error("fme_rule_based_segment.delete: Harness-native (org_id/project_id) mode is not supported on this deprecated resource — use fme_segment instead.");
1224
1225
  }
1225
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_rule_based_segment"));
1226
- return { path: `/internal/api/v2/rule-based-segments/ws/${encodeURIComponent(mode.workspaceId)}/${segmentName}` };
1226
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_rule_based_segment"));
1227
+ return { path: `/internal/api/v2/rule-based-segments/ws/${encodePathSegment(mode.workspaceId)}/${segmentName}` };
1227
1228
  },
1228
1229
  operationPolicy: { risk: "destructive", retryPolicy: "do_not_retry" },
1229
1230
  responseExtractor: passthrough,
@@ -1253,8 +1254,8 @@ export const featureFlagsToolset = {
1253
1254
  if (mode.mode === "harness_native") {
1254
1255
  throw new Error("fme_rule_based_segment_definition.list: Harness-native (org_id/project_id) mode is not supported on this deprecated resource — use fme_segment_definition instead.");
1255
1256
  }
1256
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_rule_based_segment_definition"));
1257
- return { path: `/internal/api/v2/rule-based-segments/ws/${encodeURIComponent(mode.workspaceId)}/environments/${environmentId}` };
1257
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_rule_based_segment_definition"));
1258
+ return { path: `/internal/api/v2/rule-based-segments/ws/${encodePathSegment(mode.workspaceId)}/environments/${environmentId}` };
1258
1259
  },
1259
1260
  operationPolicy: { risk: "read", retryPolicy: "safe" },
1260
1261
  pathParams: { workspace_id: "wsId", environment_id: "environmentId" },
@@ -1269,9 +1270,9 @@ export const featureFlagsToolset = {
1269
1270
  if (mode.mode === "harness_native") {
1270
1271
  throw new Error("fme_rule_based_segment_definition.update: Harness-native (org_id/project_id) mode is not supported on this deprecated resource — use fme_segment_definition instead.");
1271
1272
  }
1272
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_rule_based_segment_definition"));
1273
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_rule_based_segment_definition"));
1274
- return { path: `/internal/api/v2/rule-based-segments/ws/${encodeURIComponent(mode.workspaceId)}/${segmentName}/environments/${environmentId}` };
1273
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_rule_based_segment_definition"));
1274
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_rule_based_segment_definition"));
1275
+ return { path: `/internal/api/v2/rule-based-segments/ws/${encodePathSegment(mode.workspaceId)}/${segmentName}/environments/${environmentId}` };
1275
1276
  },
1276
1277
  operationPolicy: { risk: "low_write", retryPolicy: "safe" },
1277
1278
  pathParams: { workspace_id: "wsId", segment_name: "rbSegmentName", environment_id: "environmentId" },
@@ -1289,8 +1290,8 @@ export const featureFlagsToolset = {
1289
1290
  if (isFmeHarnessNativeSelected(input, "fme_rule_based_segment_definition.enable")) {
1290
1291
  throw new Error("fme_rule_based_segment_definition.enable: Harness-native (org_id/project_id) mode is not supported on this deprecated resource, and fme_segment_definition has no enable equivalent either — pass environment_id/segment_name (legacy contract) instead.");
1291
1292
  }
1292
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_rule_based_segment_definition"));
1293
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_rule_based_segment_definition"));
1293
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_rule_based_segment_definition"));
1294
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_rule_based_segment_definition"));
1294
1295
  return { path: `/internal/api/v2/rule-based-segments/${environmentId}/${segmentName}` };
1295
1296
  },
1296
1297
  operationPolicy: { risk: "medium_write", retryPolicy: "do_not_retry" },
@@ -1307,8 +1308,8 @@ export const featureFlagsToolset = {
1307
1308
  if (isFmeHarnessNativeSelected(input, "fme_rule_based_segment_definition.disable")) {
1308
1309
  throw new Error("fme_rule_based_segment_definition.disable: Harness-native (org_id/project_id) mode is not supported on this deprecated resource, and fme_segment_definition has no disable equivalent either — pass environment_id/segment_name (legacy contract) instead.");
1309
1310
  }
1310
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_rule_based_segment_definition"));
1311
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_rule_based_segment_definition"));
1311
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_rule_based_segment_definition"));
1312
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_rule_based_segment_definition"));
1312
1313
  return { path: `/internal/api/v2/rule-based-segments/${environmentId}/${segmentName}` };
1313
1314
  },
1314
1315
  operationPolicy: { risk: "medium_write", retryPolicy: "do_not_retry" },
@@ -1328,8 +1329,8 @@ export const featureFlagsToolset = {
1328
1329
  if (mode.mode === "harness_native") {
1329
1330
  throw new Error("fme_rule_based_segment_definition.change_request: Harness-native (org_id/project_id) mode is not supported on this deprecated resource, and fme_segment_definition has no change_request equivalent either — pass workspace_id (deprecated) instead.");
1330
1331
  }
1331
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_rule_based_segment_definition"));
1332
- return { path: `/internal/api/v2/changeRequests/ws/${encodeURIComponent(mode.workspaceId)}/environments/${environmentId}` };
1332
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_rule_based_segment_definition"));
1333
+ return { path: `/internal/api/v2/changeRequests/ws/${encodePathSegment(mode.workspaceId)}/environments/${environmentId}` };
1333
1334
  },
1334
1335
  operationPolicy: { risk: "medium_write", retryPolicy: "do_not_retry" },
1335
1336
  pathParams: { workspace_id: "wsId", environment_id: "environmentId" },
@@ -1368,7 +1369,7 @@ export const featureFlagsToolset = {
1368
1369
  routeResolver: (input) => {
1369
1370
  const mode = resolveFmeDualMode(input, "fme_traffic_type");
1370
1371
  if (mode.mode === "legacy") {
1371
- return { path: `/internal/api/v2/trafficTypes/ws/${encodeURIComponent(mode.workspaceId)}` };
1372
+ return { path: `/internal/api/v2/trafficTypes/ws/${encodePathSegment(mode.workspaceId)}` };
1372
1373
  }
1373
1374
  return { path: "/fme/api/v4/traffic-types", product: "harness", scopeParams: FME_HARNESS_NATIVE_SCOPE_PARAMS };
1374
1375
  },
@@ -1397,8 +1398,8 @@ export const featureFlagsToolset = {
1397
1398
  if (isFmeHarnessNativeSelected(input, "fme_identity.create")) {
1398
1399
  throw new Error("fme_identity.create: Harness-native (org_id/project_id) mode not yet implemented for this operation — pass traffic_type_id/environment_id (current contract) instead.");
1399
1400
  }
1400
- const trafficTypeId = encodeURIComponent(requireFmeIdentifier(input, "traffic_type_id", "fme_identity"));
1401
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_identity"));
1401
+ const trafficTypeId = encodePathSegment(requireFmeIdentifier(input, "traffic_type_id", "fme_identity"));
1402
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_identity"));
1402
1403
  return { path: `/internal/api/v2/trafficTypes/${trafficTypeId}/environments/${environmentId}/identities` };
1403
1404
  },
1404
1405
  operationPolicy: { risk: "low_write", retryPolicy: "safe" },
@@ -1437,9 +1438,9 @@ export const featureFlagsToolset = {
1437
1438
  if (isFmeHarnessNativeSelected(input, "fme_identity.update")) {
1438
1439
  throw new Error("fme_identity.update: Harness-native (org_id/project_id) mode not yet implemented for this operation — pass traffic_type_id/environment_id (current contract) instead.");
1439
1440
  }
1440
- const trafficTypeId = encodeURIComponent(requireFmeIdentifier(input, "traffic_type_id", "fme_identity"));
1441
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_identity"));
1442
- const key = encodeURIComponent(requireFmeIdentifier(input, "key", "fme_identity"));
1441
+ const trafficTypeId = encodePathSegment(requireFmeIdentifier(input, "traffic_type_id", "fme_identity"));
1442
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_identity"));
1443
+ const key = encodePathSegment(requireFmeIdentifier(input, "key", "fme_identity"));
1443
1444
  return { path: `/internal/api/v2/trafficTypes/${trafficTypeId}/environments/${environmentId}/identities/${key}` };
1444
1445
  },
1445
1446
  operationPolicy: { risk: "low_write", retryPolicy: "safe" },
@@ -1479,7 +1480,7 @@ export const featureFlagsToolset = {
1479
1480
  if (mode.mode === "harness_native") {
1480
1481
  throw new Error("fme_standard_segment.list: Harness-native (org_id/project_id) mode is not supported on this deprecated resource — use fme_segment instead.");
1481
1482
  }
1482
- return { path: `/internal/api/v2/segments/ws/${encodeURIComponent(mode.workspaceId)}` };
1483
+ return { path: `/internal/api/v2/segments/ws/${encodePathSegment(mode.workspaceId)}` };
1483
1484
  },
1484
1485
  operationPolicy: { risk: "read", retryPolicy: "safe" },
1485
1486
  responseExtractor: passthrough,
@@ -1493,8 +1494,8 @@ export const featureFlagsToolset = {
1493
1494
  if (mode.mode === "harness_native") {
1494
1495
  throw new Error("fme_standard_segment.get: Harness-native (org_id/project_id) mode is not supported on this deprecated resource — use fme_segment instead.");
1495
1496
  }
1496
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_standard_segment"));
1497
- return { path: `/internal/api/v2/segments/ws/${encodeURIComponent(mode.workspaceId)}/${segmentName}` };
1497
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_standard_segment"));
1498
+ return { path: `/internal/api/v2/segments/ws/${encodePathSegment(mode.workspaceId)}/${segmentName}` };
1498
1499
  },
1499
1500
  operationPolicy: { risk: "read", retryPolicy: "safe" },
1500
1501
  responseExtractor: passthrough,
@@ -1537,7 +1538,7 @@ export const featureFlagsToolset = {
1537
1538
  routeResolver: (input) => {
1538
1539
  requireHarnessNativeSegmentScope(input, "fme_segment");
1539
1540
  applyFmeSegmentTypeQuery(input, "get");
1540
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_segment"));
1541
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_segment"));
1541
1542
  return { path: `/fme/api/v4/segments/${segmentName}` };
1542
1543
  },
1543
1544
  operationPolicy: { risk: "read", retryPolicy: "safe" },
@@ -1552,7 +1553,7 @@ export const featureFlagsToolset = {
1552
1553
  routeResolver: (input) => {
1553
1554
  requireHarnessNativeSegmentScope(input, "fme_segment");
1554
1555
  applyFmeSegmentTypeQuery(input, "delete");
1555
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_segment"));
1556
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_segment"));
1556
1557
  return { path: `/fme/api/v4/segments/${segmentName}` };
1557
1558
  },
1558
1559
  operationPolicy: { risk: "destructive", retryPolicy: "do_not_retry" },
@@ -1593,7 +1594,7 @@ export const featureFlagsToolset = {
1593
1594
  routeResolver: (input) => {
1594
1595
  requireHarnessNativeSegmentScope(input, "fme_segment");
1595
1596
  applyFmeSegmentTypeQuery(input, "update");
1596
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_segment"));
1597
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_segment"));
1597
1598
  return {
1598
1599
  path: `/fme/api/v4/segments/${segmentName}`,
1599
1600
  headers: { "Content-Type": "application/merge-patch+json" },
@@ -1652,7 +1653,7 @@ export const featureFlagsToolset = {
1652
1653
  path: "",
1653
1654
  routeResolver: (input) => {
1654
1655
  requireHarnessNativeSegmentScope(input, "fme_segment_definition");
1655
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_segment_definition"));
1656
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_segment_definition"));
1656
1657
  return { path: `/fme/api/v4/segment-definitions/${segmentName}` };
1657
1658
  },
1658
1659
  operationPolicy: { risk: "read", retryPolicy: "safe" },
@@ -1665,7 +1666,7 @@ export const featureFlagsToolset = {
1665
1666
  path: "",
1666
1667
  routeResolver: (input) => {
1667
1668
  requireHarnessNativeSegmentScope(input, "fme_segment_definition");
1668
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_segment_definition"));
1669
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_segment_definition"));
1669
1670
  return { path: `/fme/api/v4/segment-definitions/${segmentName}` };
1670
1671
  },
1671
1672
  operationPolicy: { risk: "low_write", retryPolicy: "do_not_retry" },
@@ -1684,7 +1685,7 @@ export const featureFlagsToolset = {
1684
1685
  path: "",
1685
1686
  routeResolver: (input) => {
1686
1687
  requireHarnessNativeSegmentScope(input, "fme_segment_definition");
1687
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_segment_definition"));
1688
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_segment_definition"));
1688
1689
  return { path: `/fme/api/v4/segment-definitions/${segmentName}` };
1689
1690
  },
1690
1691
  operationPolicy: { risk: "low_write", retryPolicy: "safe" },
@@ -1705,7 +1706,7 @@ export const featureFlagsToolset = {
1705
1706
  path: "",
1706
1707
  routeResolver: (input) => {
1707
1708
  requireHarnessNativeSegmentScope(input, "fme_segment_definition");
1708
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_segment_definition"));
1709
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_segment_definition"));
1709
1710
  return { path: `/fme/api/v4/segment-definitions/${segmentName}` };
1710
1711
  },
1711
1712
  operationPolicy: { risk: "destructive", retryPolicy: "do_not_retry" },
@@ -1720,7 +1721,7 @@ export const featureFlagsToolset = {
1720
1721
  path: "",
1721
1722
  routeResolver: (input) => {
1722
1723
  requireHarnessNativeSegmentScope(input, "fme_segment_definition");
1723
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_segment_definition"));
1724
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_segment_definition"));
1724
1725
  requireFmeIdentifier(input, "environment_id", "fme_segment_definition");
1725
1726
  return { path: `/fme/api/v4/segment-definitions/${segmentName}/keys` };
1726
1727
  },
@@ -1734,7 +1735,7 @@ export const featureFlagsToolset = {
1734
1735
  path: "",
1735
1736
  routeResolver: (input) => {
1736
1737
  requireHarnessNativeSegmentScope(input, "fme_segment_definition");
1737
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_segment_definition"));
1738
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_segment_definition"));
1738
1739
  requireFmeIdentifier(input, "environment_id", "fme_segment_definition");
1739
1740
  return { path: `/fme/api/v4/segment-definitions/${segmentName}/keys` };
1740
1741
  },
@@ -1751,7 +1752,7 @@ export const featureFlagsToolset = {
1751
1752
  path: "",
1752
1753
  routeResolver: (input) => {
1753
1754
  requireHarnessNativeSegmentScope(input, "fme_segment_definition");
1754
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_segment_definition"));
1755
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_segment_definition"));
1755
1756
  requireFmeIdentifier(input, "environment_id", "fme_segment_definition");
1756
1757
  return { path: `/fme/api/v4/segment-definitions/${segmentName}/keys/remove` };
1757
1758
  },
@@ -1815,7 +1816,7 @@ export const featureFlagsToolset = {
1815
1816
  path: "",
1816
1817
  routeResolver: (input) => {
1817
1818
  requireHarnessNativeSegmentScope(input, "fme_metric");
1818
- const id = encodeURIComponent(requireFmeIdentifier(input, "metric_id", "fme_metric"));
1819
+ const id = encodePathSegment(requireFmeIdentifier(input, "metric_id", "fme_metric"));
1819
1820
  return { path: `/fme/api/v4/metrics/${id}` };
1820
1821
  },
1821
1822
  operationPolicy: { risk: "read", retryPolicy: "safe" },
@@ -1856,7 +1857,7 @@ export const featureFlagsToolset = {
1856
1857
  path: "",
1857
1858
  routeResolver: (input) => {
1858
1859
  requireHarnessNativeSegmentScope(input, "fme_metric");
1859
- const id = encodeURIComponent(requireFmeIdentifier(input, "metric_id", "fme_metric"));
1860
+ const id = encodePathSegment(requireFmeIdentifier(input, "metric_id", "fme_metric"));
1860
1861
  return { path: `/fme/api/v4/metrics/${id}` };
1861
1862
  },
1862
1863
  operationPolicy: { risk: "low_write", retryPolicy: "safe" },
@@ -1897,7 +1898,7 @@ export const featureFlagsToolset = {
1897
1898
  path: "",
1898
1899
  routeResolver: (input) => {
1899
1900
  requireHarnessNativeSegmentScope(input, "fme_metric");
1900
- const id = encodeURIComponent(requireFmeIdentifier(input, "metric_id", "fme_metric"));
1901
+ const id = encodePathSegment(requireFmeIdentifier(input, "metric_id", "fme_metric"));
1901
1902
  return { path: `/fme/api/v4/metrics/${id}` };
1902
1903
  },
1903
1904
  operationPolicy: { risk: "destructive", retryPolicy: "do_not_retry" },
@@ -1960,7 +1961,7 @@ export const featureFlagsToolset = {
1960
1961
  path: "",
1961
1962
  routeResolver: (input) => {
1962
1963
  requireHarnessNativeSegmentScope(input, "fme_experiment");
1963
- const id = encodeURIComponent(requireFmeIdentifier(input, "experiment_id", "fme_experiment"));
1964
+ const id = encodePathSegment(requireFmeIdentifier(input, "experiment_id", "fme_experiment"));
1964
1965
  return { path: `/fme/api/v4/experiments/${id}` };
1965
1966
  },
1966
1967
  operationPolicy: { risk: "read", retryPolicy: "safe" },
@@ -2007,7 +2008,7 @@ export const featureFlagsToolset = {
2007
2008
  path: "",
2008
2009
  routeResolver: (input) => {
2009
2010
  requireHarnessNativeSegmentScope(input, "fme_experiment");
2010
- const id = encodeURIComponent(requireFmeIdentifier(input, "experiment_id", "fme_experiment"));
2011
+ const id = encodePathSegment(requireFmeIdentifier(input, "experiment_id", "fme_experiment"));
2011
2012
  return { path: `/fme/api/v4/experiments/${id}` };
2012
2013
  },
2013
2014
  operationPolicy: { risk: "low_write", retryPolicy: "safe" },
@@ -2041,7 +2042,7 @@ export const featureFlagsToolset = {
2041
2042
  path: "",
2042
2043
  routeResolver: (input) => {
2043
2044
  requireHarnessNativeSegmentScope(input, "fme_experiment");
2044
- const id = encodeURIComponent(requireFmeIdentifier(input, "experiment_id", "fme_experiment"));
2045
+ const id = encodePathSegment(requireFmeIdentifier(input, "experiment_id", "fme_experiment"));
2045
2046
  return { path: `/fme/api/v4/experiments/${id}` };
2046
2047
  },
2047
2048
  operationPolicy: { risk: "destructive", retryPolicy: "do_not_retry" },
@@ -2069,7 +2070,7 @@ export const featureFlagsToolset = {
2069
2070
  path: "",
2070
2071
  routeResolver: (input) => {
2071
2072
  requireHarnessNativeSegmentScope(input, "fme_experiment_settings");
2072
- const id = encodeURIComponent(requireFmeIdentifier(input, "experiment_id", "fme_experiment_settings"));
2073
+ const id = encodePathSegment(requireFmeIdentifier(input, "experiment_id", "fme_experiment_settings"));
2073
2074
  return { path: `/fme/api/v4/experiments/${id}/settings` };
2074
2075
  },
2075
2076
  operationPolicy: { risk: "read", retryPolicy: "safe" },
@@ -2083,7 +2084,7 @@ export const featureFlagsToolset = {
2083
2084
  path: "",
2084
2085
  routeResolver: (input) => {
2085
2086
  requireHarnessNativeSegmentScope(input, "fme_experiment_settings");
2086
- const id = encodeURIComponent(requireFmeIdentifier(input, "experiment_id", "fme_experiment_settings"));
2087
+ const id = encodePathSegment(requireFmeIdentifier(input, "experiment_id", "fme_experiment_settings"));
2087
2088
  return { path: `/fme/api/v4/experiments/${id}/settings` };
2088
2089
  },
2089
2090
  operationPolicy: { risk: "low_write", retryPolicy: "safe" },
@@ -2109,7 +2110,7 @@ export const featureFlagsToolset = {
2109
2110
  path: "",
2110
2111
  routeResolver: (input) => {
2111
2112
  requireHarnessNativeSegmentScope(input, "fme_experiment_settings");
2112
- const id = encodeURIComponent(requireFmeIdentifier(input, "experiment_id", "fme_experiment_settings"));
2113
+ const id = encodePathSegment(requireFmeIdentifier(input, "experiment_id", "fme_experiment_settings"));
2113
2114
  return { path: `/fme/api/v4/experiments/${id}/settings` };
2114
2115
  },
2115
2116
  operationPolicy: { risk: "destructive", retryPolicy: "do_not_retry" },
@@ -2137,7 +2138,7 @@ export const featureFlagsToolset = {
2137
2138
  path: "",
2138
2139
  routeResolver: (input) => {
2139
2140
  requireHarnessNativeSegmentScope(input, "fme_experiment_alerting");
2140
- const id = encodeURIComponent(requireFmeIdentifier(input, "experiment_id", "fme_experiment_alerting"));
2141
+ const id = encodePathSegment(requireFmeIdentifier(input, "experiment_id", "fme_experiment_alerting"));
2141
2142
  return { path: `/fme/api/v4/experiments/${id}/alerting` };
2142
2143
  },
2143
2144
  operationPolicy: { risk: "read", retryPolicy: "safe" },
@@ -2150,7 +2151,7 @@ export const featureFlagsToolset = {
2150
2151
  path: "",
2151
2152
  routeResolver: (input) => {
2152
2153
  requireHarnessNativeSegmentScope(input, "fme_experiment_alerting");
2153
- const id = encodeURIComponent(requireFmeIdentifier(input, "experiment_id", "fme_experiment_alerting"));
2154
+ const id = encodePathSegment(requireFmeIdentifier(input, "experiment_id", "fme_experiment_alerting"));
2154
2155
  return { path: `/fme/api/v4/experiments/${id}/alerting` };
2155
2156
  },
2156
2157
  operationPolicy: { risk: "low_write", retryPolicy: "safe" },
@@ -2191,7 +2192,7 @@ export const featureFlagsToolset = {
2191
2192
  path: "",
2192
2193
  routeResolver: (input) => {
2193
2194
  requireHarnessNativeSegmentScope(input, "fme_experiment_result");
2194
- const id = encodeURIComponent(requireFmeIdentifier(input, "experiment_id", "fme_experiment_result"));
2195
+ const id = encodePathSegment(requireFmeIdentifier(input, "experiment_id", "fme_experiment_result"));
2195
2196
  return { path: `/fme/api/v4/experiments/${id}/metric-results` };
2196
2197
  },
2197
2198
  operationPolicy: { risk: "read", retryPolicy: "safe" },
@@ -2259,7 +2260,7 @@ export const featureFlagsToolset = {
2259
2260
  path: "",
2260
2261
  routeResolver: (input) => {
2261
2262
  requireHarnessNativeSegmentScope(input, "fme_event_type");
2262
- const id = encodeURIComponent(requireFmeIdentifier(input, "event_type_id", "fme_event_type"));
2263
+ const id = encodePathSegment(requireFmeIdentifier(input, "event_type_id", "fme_event_type"));
2263
2264
  return { path: `/fme/api/v4/event-types/${id}` };
2264
2265
  },
2265
2266
  operationPolicy: { risk: "read", retryPolicy: "safe" },
@@ -2292,8 +2293,8 @@ export const featureFlagsToolset = {
2292
2293
  if (isFmeHarnessNativeSelected(input, "fme_segment_keys.list")) {
2293
2294
  throw new Error("fme_segment_keys.list: Harness-native (org_id/project_id) mode not supported — use fme_segment_definition execute list_keys instead.");
2294
2295
  }
2295
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_segment_keys"));
2296
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_segment_keys"));
2296
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_segment_keys"));
2297
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_segment_keys"));
2297
2298
  return { path: `/internal/api/v2/segments/${environmentId}/${segmentName}/keys` };
2298
2299
  },
2299
2300
  operationPolicy: { risk: "read", retryPolicy: "safe" },
@@ -2312,8 +2313,8 @@ export const featureFlagsToolset = {
2312
2313
  if (isFmeHarnessNativeSelected(input, "fme_segment_keys.update")) {
2313
2314
  throw new Error("fme_segment_keys.update: Harness-native (org_id/project_id) mode not supported — use fme_segment_definition execute add_keys/remove_keys instead.");
2314
2315
  }
2315
- const environmentId = encodeURIComponent(requireFmeIdentifier(input, "environment_id", "fme_segment_keys"));
2316
- const segmentName = encodeURIComponent(requireFmeIdentifier(input, "segment_name", "fme_segment_keys"));
2316
+ const environmentId = encodePathSegment(requireFmeIdentifier(input, "environment_id", "fme_segment_keys"));
2317
+ const segmentName = encodePathSegment(requireFmeIdentifier(input, "segment_name", "fme_segment_keys"));
2317
2318
  return { path: `/internal/api/v2/segments/${environmentId}/${segmentName}/upload` };
2318
2319
  },
2319
2320
  operationPolicy: { risk: "medium_write", retryPolicy: "do_not_retry" },