import { coreFeatures } from '@mastra/core/features';

function hasMethod(obj, method) {
  return method in obj && typeof obj[method] === "function";
}
const isWorkspaceV1Supported = (client) => {
  const workspaceClientMethods = ["listWorkspaces", "getWorkspace"];
  const coreSupported = coreFeatures.has("workspaces-v1");
  const clientSupported = workspaceClientMethods.every((method) => hasMethod(client, method));
  return coreSupported && clientSupported;
};

export { isWorkspaceV1Supported };
//# sourceMappingURL=utils.es.js.map
